Add support to EGL to on the fly destroy the resulting surface

This commit is contained in:
Ryan Houdek
2016-01-10 12:28:05 -06:00
parent d17bcbb489
commit 6448e5e5ee
3 changed files with 83 additions and 26 deletions

View File

@ -11,6 +11,15 @@
class cInterfaceEGL : public cInterfaceBase
{
private:
EGLConfig m_config;
bool m_has_handle;
EGLNativeWindowType m_host_window;
bool m_supports_surfaceless = false;
void CreateWindowSurface();
void DestroyWindowSurface();
protected:
void DetectMode();
EGLSurface egl_surf;
@ -20,6 +29,7 @@ protected:
virtual EGLDisplay OpenDisplay() = 0;
virtual EGLNativeWindowType InitializePlatform(EGLNativeWindowType host_window, EGLConfig config) = 0;
virtual void ShutdownPlatform() = 0;
public:
void Swap() override;
void SwapInterval(int interval) override;
@ -29,4 +39,6 @@ public:
bool MakeCurrent() override;
bool ClearCurrent() override;
void Shutdown() override;
void UpdateHandle(void* window_handle) override;
void UpdateSurface() override;
};