[gtk/wip/otte/gleanup: 63/69] GDK: Add debug option for WGL usage




commit 969b3257a7d6042ef0087b7586d4457000f0374c
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Jul 14 12:28:07 2021 +0800

    GDK: Add debug option for WGL usage
    
    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      | 3 ++-
 gdk/gdkdebug.h | 7 ++++---
 2 files changed, 6 insertions(+), 4 deletions(-)
---
diff --git a/gdk/gdk.c b/gdk/gdk.c
index c6b5b7b8ce..64823434da 100644
--- 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" },
diff --git a/gdk/gdkdebug.h b/gdk/gdkdebug.h
index 111cc2f28a..4386c220eb 100644
--- a/gdk/gdkdebug.h
+++ b/gdk/gdkdebug.h
@@ -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;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]