diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-16 16:59:33 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2013-12-16 16:59:33 +0100 |
commit | 3f3be55835427ea9f1bbcc046e05ee538ca214d7 (patch) | |
tree | 09d1f54d114855c2b06cc505dfbf74c5890c8419 /src/plugins/platforms/windows/qwindowsglcontext.cpp | |
parent | ae293c1cb220847194fba6dcebdbb9194837bb56 (diff) | |
parent | 9764f8602719676d1fa15e6fd1e7980af16bfc63 (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/gui/kernel/qplatformtheme.h
tests/auto/network/socket/qudpsocket/tst_qudpsocket.cpp
tests/auto/widgets/widgets/qspinbox/tst_qspinbox.cpp
Change-Id: Iecd3343d6a050b8764f78d809c4a1532aeba69e5
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsglcontext.cpp')
-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 d63149e4ce..281f54a9d9 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: |