summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qglxintegration.cpp
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2013-02-06 16:54:49 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-15 17:48:36 +0100
commitcb1b451cd14967fb0eecab797763a6fec579677b (patch)
tree206fa488b6bd3a89e8050fc8f9fbbc02077fd394 /src/plugins/platforms/xcb/qglxintegration.cpp
parent34c240289a8682b60d5a61670e1d330d630e1f93 (diff)
Fix the GL_CONTEXT_FLAG_DEBUG_BIT check
Use the correct enum. GL_CONTEXT_FLAG_DEBUG_BIT does not have the same value as GLX/WGL_CONTEXT_DEBUG_BIT_ARB. Change-Id: I7d90da54ca1ff526c8b00669b486a68424fc8dfb Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms/xcb/qglxintegration.cpp')
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index 015c51572f..11c74edc45 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -74,6 +74,10 @@ typedef GLXContext (*glXCreateContextAttribsARBProc)(Display*, GLXFBConfig, GLXC
#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
#endif
+#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+#endif
+
static Window createDummyWindow(QXcbScreen *screen, XVisualInfo *visualInfo)
{
Colormap cmap = XCreateColormap(DISPLAY_FROM_XCB(screen), screen->root(), visualInfo->visual, AllocNone);
@@ -183,7 +187,7 @@ static void updateFormatFromContext(QSurfaceFormat &format)
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
format.setOption(QSurfaceFormat::DeprecatedFunctions);
- if (value & GLX_CONTEXT_DEBUG_BIT_ARB)
+ if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
format.setOption(QSurfaceFormat::DebugContext);
if (version < 0x0302)
return;