From cb1b451cd14967fb0eecab797763a6fec579677b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=B6glund?= Date: Wed, 6 Feb 2013 16:54:49 +0100 Subject: Fix the GL_CONTEXT_FLAG_DEBUG_BIT check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/plugins/platforms/windows/qwindowsglcontext.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/windows/qwindowsglcontext.cpp') diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 3cf2113f63..081b42ce65 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -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 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; -- cgit v1.2.3