From 15177905ff12d9b7bbb81fd34e355c494415edc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 6 Feb 2013 16:47:40 +0100 Subject: [PATCH] Fix the GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I83dc92085c81b8b0c71502ea71878b5e85cbbacc Reviewed-by: Samuel Rødal --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 2 +- src/plugins/platforms/xcb/qglxintegration.cpp | 2 +- 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);