[gtk/wip/master.win.egl: 231/231] gdk/win32/gdkglcontext-win32.c: Fix think'o
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/master.win.egl: 231/231] gdk/win32/gdkglcontext-win32.c: Fix think'o
- Date: Mon, 1 Apr 2019 04:13:56 +0000 (UTC)
commit f4a082e363e130df47e4381802327a6bed8026e9
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Apr 1 12:01:41 2019 +0800
gdk/win32/gdkglcontext-win32.c: Fix think'o
Trying to test whether a GdkGLContext is a GLES context when it is NULL
is quite dumb, and we are actually asking for the assertion
that the GDKGLContext is NULL :| D'oh...
Instead, see whether we have set up an EGL display, which should always
be present when EGL is being used (and otherwise not when WGL is used),
and determine which way we should make no GL/EGL context current.
gdk/win32/gdkglcontext-win32.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gdk/win32/gdkglcontext-win32.c b/gdk/win32/gdkglcontext-win32.c
index 2454d931b0..a16bdf0de0 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -1164,16 +1164,16 @@ _gdk_win32_display_make_gl_context_current (GdkDisplay *display,
if (context == NULL)
{
- if (!gdk_gl_context_get_use_es (context))
- wglMakeCurrent(NULL, NULL);
-
#ifdef GDK_WIN32_ENABLE_EGL
- else
+ if (display_win32->egl_disp != EGL_NO_DISPLAY)
eglMakeCurrent(display_win32->egl_disp,
EGL_NO_SURFACE,
EGL_NO_SURFACE,
EGL_NO_CONTEXT);
+ else
#endif
+ wglMakeCurrent(NULL, NULL);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]