Fix the GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT check
Change-Id: I83dc92085c81b8b0c71502ea71878b5e85cbbacc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
fa167d2afa
commit
15177905ff
@ -704,7 +704,7 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
|
||||
// v3 onwards
|
||||
GLint value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
|
||||
if (value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
|
||||
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
|
||||
result.options |= QSurfaceFormat::DeprecatedFunctions;
|
||||
if (value & WGL_CONTEXT_DEBUG_BIT_ARB)
|
||||
result.options |= QSurfaceFormat::DebugContext;
|
||||
|
@ -179,7 +179,7 @@ static void updateFormatFromContext(QSurfaceFormat &format)
|
||||
// a debug context
|
||||
GLint value = 0;
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &value);
|
||||
if (value & ~GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
|
||||
if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT))
|
||||
format.setOption(QSurfaceFormat::DeprecatedFunctions);
|
||||
if (value & GLX_CONTEXT_DEBUG_BIT_ARB)
|
||||
format.setOption(QSurfaceFormat::DebugContext);
|
||||
|
Loading…
Reference in New Issue
Block a user