From 6cf704842323f2e3731ca0f03c4e1ac2fe2adda3 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 4 Sep 2015 19:58:58 -0500 Subject: [PATCH] Implement ClearCurrent on the EGL GLInterface This fixes an error on GLInterface shutdown when using EGL. --- Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp | 6 ++++++ Source/Core/VideoBackends/OGL/GLInterface/EGL.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp b/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp index 6020be1eaa..3649886104 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp +++ b/Source/Core/VideoBackends/OGL/GLInterface/EGL.cpp @@ -201,6 +201,12 @@ bool cInterfaceEGL::MakeCurrent() { return eglMakeCurrent(egl_dpy, egl_surf, egl_surf, egl_ctx); } + +bool cInterfaceEGL::ClearCurrent() +{ + return eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); +} + // Close backend void cInterfaceEGL::Shutdown() { diff --git a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h b/Source/Core/VideoBackends/OGL/GLInterface/EGL.h index 2d290bf02f..5309d81401 100644 --- a/Source/Core/VideoBackends/OGL/GLInterface/EGL.h +++ b/Source/Core/VideoBackends/OGL/GLInterface/EGL.h @@ -28,5 +28,6 @@ public: void* GetFuncAddress(const std::string& name); bool Create(void *window_handle); bool MakeCurrent(); + bool ClearCurrent(); void Shutdown(); };