summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFredrik Höglund <fredrik@kde.org>2013-02-06 16:47:40 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-02-13 18:42:38 +0100
commit15177905ff12d9b7bbb81fd34e355c494415edc0 (patch)
tree5f331f9eb07f6288b117db5d8d3ce1dd757912e5 /src
parentfa167d2afad4c2ff8b7e9412091ffc7e1ffb3458 (diff)
Fix the GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT check
Change-Id: I83dc92085c81b8b0c71502ea71878b5e85cbbacc Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp2
-rw-r--r--src/plugins/platforms/xcb/qglxintegration.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index 0ef9f931c2..544f5e2c8c 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -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;
diff --git a/src/plugins/platforms/xcb/qglxintegration.cpp b/src/plugins/platforms/xcb/qglxintegration.cpp
index b7f0b14c70..d4998432d9 100644
--- a/src/plugins/platforms/xcb/qglxintegration.cpp
+++ b/src/plugins/platforms/xcb/qglxintegration.cpp
@@ -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);