forked from AuroraMiddleware/gtk
Make the gl-debug debug flag always available
No need to restrict this to debug builds.
This commit is contained in:
parent
01054c9c79
commit
f50b0a0bcb
@ -119,9 +119,9 @@ 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-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL", TRUE },
|
||||
{ "gl-legacy", GDK_DEBUG_GL_LEGACY, "Use a legacy OpenGL context", TRUE },
|
||||
{ "gl-gles", GDK_DEBUG_GL_GLES, "Only allow OpenGL GLES API", TRUE },
|
||||
{ "gl-debug", GDK_DEBUG_GL_DEBUG, "Insert debugging information in OpenGL" },
|
||||
{ "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" },
|
||||
|
@ -1485,9 +1485,7 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
{
|
||||
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
|
||||
gboolean gl_debug = FALSE;
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GdkDisplay *display;
|
||||
#endif
|
||||
|
||||
if (!gdk_gl_context_is_realized (context))
|
||||
return;
|
||||
@ -1500,16 +1498,10 @@ gdk_gl_context_check_extensions (GdkGLContext *context)
|
||||
priv->has_debug_output = epoxy_has_gl_extension ("GL_ARB_debug_output") ||
|
||||
epoxy_has_gl_extension ("GL_KHR_debug");
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
display = gdk_draw_context_get_display (GDK_DRAW_CONTEXT (context));
|
||||
gl_debug = GDK_DISPLAY_DEBUG_CHECK (display, GL_DEBUG);
|
||||
#endif
|
||||
gl_debug = (gdk_display_get_debug_flags (display) & GDK_DEBUG_GL_DEBUG) != 0;
|
||||
|
||||
if (priv->has_debug_output
|
||||
#ifndef G_ENABLE_CONSISTENCY_CHECKS
|
||||
&& gl_debug
|
||||
#endif
|
||||
)
|
||||
if (priv->has_debug_output && gl_debug)
|
||||
{
|
||||
gdk_gl_context_make_current (context);
|
||||
glEnable (GL_DEBUG_OUTPUT);
|
||||
|
Loading…
Reference in New Issue
Block a user