You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
538 B

#pragma once
#include <EGL/egl.h>
class EglState
{
public:
EglState(void* native_display);
~EglState();
EGLDisplay display() const { return m_display; }
EGLConfig config() const { return m_config; }
EGLContext context() const { return m_context; }
private:
EGLDisplay m_display;
EGLConfig m_config;
EGLContext m_context;
};
class EglSurface
{
public:
EglSurface(const EglState& egl, void* native_window);
~EglSurface();
void make_current();
void swap_buffers();
private:
const EglState& egl;
EGLSurface esurface;
};