diff options
author | Laszlo Agocs <laszlo.agocs@digia.com> | 2013-11-27 16:10:20 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-12-13 13:58:07 +0100 |
commit | fc10bfd55035d27c9352c1678c3aad87c4be2e09 (patch) | |
tree | a12b820be4d36e1c02fff846e1a22a3f6f6c6a78 /src | |
parent | 9b621f38619d8d9b3e61723f4cd4e821f909697a (diff) |
Correct debug bit setting with WGL
No need to tie the debug bit to OpenGL 3.0+. xcb is correct
in this respect, let's correct the windows plugin too.
Change-Id: I13ea48de067d3fb61575be8f71b97bb547d8eb02
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsglcontext.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index b7de368fa8..82deb0f473 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -586,15 +586,17 @@ static HGLRC createContext(const QOpenGLStaticContext &staticContext, attributes[attribIndex++] = WGL_CONTEXT_MINOR_VERSION_ARB; attributes[attribIndex++] = minorVersion; } + + int flags = 0; + if (format.testOption(QSurfaceFormat::DebugContext)) + flags |= WGL_CONTEXT_DEBUG_BIT_ARB; if (requestedVersion >= 0x0300) { - attributes[attribIndex++] = WGL_CONTEXT_FLAGS_ARB; - attributes[attribIndex] = 0; if (!format.testOption(QSurfaceFormat::DeprecatedFunctions)) - attributes[attribIndex] |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; - if (format.testOption(QSurfaceFormat::DebugContext)) - attributes[attribIndex] |= WGL_CONTEXT_DEBUG_BIT_ARB; - attribIndex++; + flags |= WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB; } + attributes[attribIndex++] = WGL_CONTEXT_FLAGS_ARB; + attributes[attribIndex++] = flags; + if (requestedVersion >= 0x0302) { switch (format.profile()) { case QSurfaceFormat::NoProfile: |