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:
Fredrik Höglund 2013-02-06 16:47:40 +01:00 committed by The Qt Project
parent fa167d2afa
commit 15177905ff
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);