summaryrefslogtreecommitdiff
path: root/platform/winrt/gl_context_egl.h
blob: ca3760e7238b055a6371eec629b3b32cc857930c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef CONTEXT_EGL_H
#define CONTEXT_EGL_H

#include <wrl.h>

#include "os/os.h"
#include "EGL/egl.h"
#include "error_list.h"
#include "drivers/gl_context/context_gl.h"

using namespace Windows::UI::Core;

class ContextEGL : public ContextGL {

	CoreWindow^ window;

	EGLDisplay mEglDisplay;
	EGLContext mEglContext;
	EGLSurface mEglSurface;

	EGLint width;
	EGLint height;

public:

	virtual void release_current();

	virtual void make_current();

	virtual int get_window_width();
	virtual int get_window_height();
	virtual void swap_buffers();

	virtual Error initialize();
	void reset();

	void cleanup();

	ContextEGL(CoreWindow^ p_window);
	~ContextEGL();

};

#endif