26 lines
484 B
C++
26 lines
484 B
C++
#pragma once
|
|
|
|
typedef void* EGLContext;
|
|
typedef void* EGLDisplay;
|
|
typedef void* EGLSurface;
|
|
typedef void* EGLConfig;
|
|
struct ANativeWindow;
|
|
|
|
namespace egl
|
|
{
|
|
class Context
|
|
{
|
|
EGLContext m_context;
|
|
EGLDisplay m_display;
|
|
EGLSurface m_surface;
|
|
EGLConfig m_config;
|
|
ANativeWindow* m_native_window;
|
|
public:
|
|
Context();
|
|
bool create(ANativeWindow* window = nullptr);
|
|
void destroy();
|
|
void swap();
|
|
bool make_current(ANativeWindow* window = nullptr);
|
|
};
|
|
}
|