[gtk/wip/otte/gleanup: 70/70] GDK-Win32: init_gl(): Default to WGL for now
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/gleanup: 70/70] GDK-Win32: init_gl(): Default to WGL for now
- Date: Mon, 19 Jul 2021 02:52:51 +0000 (UTC)
commit 69509627d899645c58aff1524065258a1d2800d0
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Jul 19 10:48:03 2021 +0800
GDK-Win32: init_gl(): Default to WGL for now
Since the shaders need to be updated for using with GLES (libANGLE at
least), default to WGL for now. Unfortunately it is not that common for
Windows to have GLES support, in which the easiest way to obtain such
support is via Google's libANGLE.
gdk/win32/gdkdisplay-win32.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
---
diff --git a/gdk/win32/gdkdisplay-win32.c b/gdk/win32/gdkdisplay-win32.c
index c3d001baca..45187e512e 100644
--- a/gdk/win32/gdkdisplay-win32.c
+++ b/gdk/win32/gdkdisplay-win32.c
@@ -1183,21 +1183,17 @@ gdk_win32_display_init_gl_backend (GdkDisplay *display,
* EGL, we want to avoid using it in favor of WGL.
*/
-#ifdef GDK_WIN32_ENABLE_EGL
- if (gdk_win32_display_init_egl (display, error))
- return TRUE;
-#endif
- g_clear_error (error);
-
if (gdk_win32_display_init_wgl (display, error))
return TRUE;
g_clear_error (error);
#ifdef GDK_WIN32_ENABLE_EGL
- return gdk_win32_display_init_egl (display, error);
-#else
- return FALSE;
+ if (gdk_win32_display_init_egl (display, error))
+ return TRUE;
#endif
+ g_clear_error (error);
+
+ return gdk_win32_display_init_wgl (display, error);
}
static GdkGLContext *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]