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.
This commit is contained in:
Chun-wei Fan
2021-07-14 12:28:07 +08:00
committed by Benjamin Otte
parent 65c6af31e1
commit 969b3257a7
2 changed files with 6 additions and 4 deletions

View File

@@ -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" },

View 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;