[gtk/wip/master.win.egl: 2488/2488] 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: 2488/2488] gdk/win32/gdkglcontext-win32.c: Fix think'o
- Date: Fri, 22 Nov 2019 10:35:22 +0000 (UTC)
commit aed60e0d5a6c60983986fc8e7a846a58554631a4
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 f0d90ae9a9..9b8a5a5659 100644
--- a/gdk/win32/gdkglcontext-win32.c
+++ b/gdk/win32/gdkglcontext-win32.c
@@ -1184,16 +1184,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]