Make the gl-legacy debug flag always available

No need to restrict this to debug builds.
This commit is contained in:
Matthias Clasen 2022-09-21 21:09:08 -04:00
parent e08a9ea9ad
commit 8bd3ec2ba1
4 changed files with 7 additions and 7 deletions

View File

@ -119,7 +119,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
{ "nograbs", GDK_DEBUG_NOGRABS, "Disable pointer and keyboard grabs (X11)", TRUE },
{ "portals", GDK_DEBUG_PORTALS, "Force the use of portals", TRUE },
{ "gl-disable", GDK_DEBUG_GL_DISABLE, "Disable OpenGL support", TRUE },
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context" },
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API" },
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
{ "gl-egl", GDK_DEBUG_GL_EGL, "Use EGL on X11 or Windows" },

View File

@ -395,8 +395,8 @@ gdk_gl_context_realize_egl (GdkGLContext *context,
return 0;
}
prefer_legacy = (GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY) ||
(share != NULL && gdk_gl_context_is_legacy (share)));
prefer_legacy = (gdk_display_get_debug_flags(display) & GDK_DEBUG_GL_LEGACY) ||
(share != NULL && gdk_gl_context_is_legacy (share));
if (preferred_api == GDK_GL_API_GL)
{

View File

@ -564,9 +564,9 @@ gdk_win32_gl_context_wgl_realize (GdkGLContext *context,
* A legacy context cannot be shared with core profile ones, so this means we
* must stick to a legacy context if the shared context is a legacy context
*/
legacy_bit = GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY) ?
TRUE :
share != NULL && gdk_gl_context_is_legacy (share);
legacy_bit = (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY)
? TRUE
: share != NULL && gdk_gl_context_is_legacy (share);
if (!set_wgl_pixformat_for_hdc (hdc,
&pixel_format,

View File

@ -609,7 +609,7 @@ gdk_x11_gl_context_glx_realize (GdkGLContext *context,
/* If there is no glXCreateContextAttribsARB() then we default to legacy */
legacy = !GDK_X11_DISPLAY (display)->has_glx_create_context;
if (GDK_DISPLAY_DEBUG_CHECK (display, GL_LEGACY))
if (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_LEGACY)
legacy = TRUE;
/* We cannot share legacy contexts with core profile ones, so the