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>
This commit is contained in:
parent
34c240289a
commit
cb1b451cd1
@ -136,6 +136,10 @@
|
||||
#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
|
||||
#endif
|
||||
|
||||
#ifndef GL_CONTEXT_FLAG_DEBUG_BIT
|
||||
#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
|
||||
#endif
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
|
||||
template <class MaskType, class FlagType> inline bool testFlag(MaskType mask, FlagType flag)
|
||||
@ -706,7 +710,7 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
|
||||
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
|
||||
result.options |= QSurfaceFormat::DeprecatedFunctions;
|
||||
if (value & WGL_CONTEXT_DEBUG_BIT_ARB)
|
||||
if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
|
||||
result.options |= QSurfaceFormat::DebugContext;
|
||||
if (result.version < 0x0302)
|
||||
return result;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user