GDK: Add debug option for WGL usage
authorChun-wei Fan <fanchunwei@src.gnome.org>
Wed, 14 Jul 2021 04:28:07 +0000 (12:28 +0800)
committerBenjamin Otte <otte@redhat.com>
Thu, 22 Jul 2021 14:28:16 +0000 (16:28 +0200)
This way, one can force using WGL on Windows even if EGL support was
enabled.  Also update the help text for gl-egl as it will apply for
Windows, albeit a bit later.

gdk/gdk.c
gdk/gdkdebug.h

index c6b5b7b8ce1f23e20dfcc8a1634242a4a1d0cef5..64823434da2d9ba51730479258f0c7afbf6a4c12 100644 (file)
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -127,8 +127,9 @@ static const GdkDebugKey gdk_debug_keys[] = {
   { "gl-legacy",       GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context" },
   { "gl-gles",         GDK_DEBUG_GL_GLES, "Use a GLES OpenGL context" },
   { "gl-debug",        GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
-  { "gl-egl",          GDK_DEBUG_GL_EGL, "Use EGL on X11" },
+  { "gl-egl",          GDK_DEBUG_GL_EGL, "Use EGL on X11 or Windows" },
   { "gl-glx",          GDK_DEBUG_GL_GLX, "Use GLX on X11" },
+  { "gl-wgl",          GDK_DEBUG_GL_WGL, "Use WGL on Windows" },
   { "vulkan-disable",  GDK_DEBUG_VULKAN_DISABLE, "Disable Vulkan support" },
   { "vulkan-validate", GDK_DEBUG_VULKAN_VALIDATE, "Load the Vulkan validation layer" },
   { "default-settings",GDK_DEBUG_DEFAULT_SETTINGS, "Force default values for xsettings" },
index 111cc2f28a4b064371363ecfb8dc651324f59d5e..4386c220eb2e49ba1359db8daf7f7fa61e03101b 100644 (file)
@@ -43,9 +43,10 @@ typedef enum {
   GDK_DEBUG_GL_DEBUG        = 1 << 17,
   GDK_DEBUG_GL_EGL          = 1 << 18,
   GDK_DEBUG_GL_GLX          = 1 << 19,
-  GDK_DEBUG_VULKAN_DISABLE  = 1 << 20,
-  GDK_DEBUG_VULKAN_VALIDATE = 1 << 21,
-  GDK_DEBUG_DEFAULT_SETTINGS= 1 << 22
+  GDK_DEBUG_GL_WGL          = 1 << 20,
+  GDK_DEBUG_VULKAN_DISABLE  = 1 << 21,
+  GDK_DEBUG_VULKAN_VALIDATE = 1 << 22,
+  GDK_DEBUG_DEFAULT_SETTINGS= 1 << 23,
 } GdkDebugFlags;
 
 extern guint _gdk_debug_flags;