summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-15 01:00:30 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-08-15 01:00:30 +0200
commitc5c938055524b8b7e41ad361b0063f9ed1762044 (patch)
tree6f2961ef872e33679e02c0d0ef82334381db93f3 /src/plugins/platforms/windows
parent8bd48a1c335b404ebbeb7c09c859e0715e6b5cd4 (diff)
parent0d024bd0a63fa7a741f4f118a3b48806b695594f (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowsglcontext.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp
index e95eaef420..1063432dcc 100644
--- a/src/plugins/platforms/windows/qwindowsglcontext.cpp
+++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp
@@ -876,10 +876,6 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
result.options |= QSurfaceFormat::DeprecatedFunctions;
if (value & GL_CONTEXT_FLAG_DEBUG_BIT)
result.options |= QSurfaceFormat::DebugContext;
- value = 0;
- QOpenGLStaticContext::opengl32.glGetIntegerv(RESET_NOTIFICATION_STRATEGY_ARB, &value);
- if (value == LOSE_CONTEXT_ON_RESET_ARB)
- result.options |= QSurfaceFormat::ResetNotification;
if (result.version < 0x0302)
return result;
// v3.2 onwards: Profiles
@@ -889,6 +885,13 @@ QWindowsOpenGLContextFormat QWindowsOpenGLContextFormat::current()
result.profile = QSurfaceFormat::CoreProfile;
else if (value & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
result.profile = QSurfaceFormat::CompatibilityProfile;
+ if (result.version < 0x0400)
+ return result;
+ // v4.0 onwards
+ value = 0;
+ QOpenGLStaticContext::opengl32.glGetIntegerv(RESET_NOTIFICATION_STRATEGY_ARB, &value);
+ if (value == LOSE_CONTEXT_ON_RESET_ARB)
+ result.options |= QSurfaceFormat::ResetNotification;
return result;
}