diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-16 01:00:32 +0200 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-08-16 01:00:33 +0200 |
commit | 56f46ba13dd9273b4be4e8f1f1f867a6feff04da (patch) | |
tree | c05a8f2bea5f645eaff32a5aa0380a9704366b6e /src/plugins/platforms/xcb | |
parent | 37bae591b7829cd8ac6a9c8556bbe6b96b365bc3 (diff) | |
parent | 66a1975200c5ec106205522c37e32f990df84883 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
Diffstat (limited to 'src/plugins/platforms/xcb')
-rw-r--r-- | src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp index f26f698e76..5e5fefca90 100644 --- a/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp +++ b/src/plugins/platforms/xcb/gl_integrations/xcb_glx/qglxintegration.cpp @@ -163,10 +163,12 @@ static void updateFormatFromContext(QSurfaceFormat &format) format.setOption(QSurfaceFormat::StereoBuffers); if (format.renderableType() == QSurfaceFormat::OpenGL) { - GLint value = 0; - glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, &value); - if (value == GL_LOSE_CONTEXT_ON_RESET_ARB) - format.setOption(QSurfaceFormat::ResetNotification); + if (format.version() >= qMakePair(4, 0)) { + GLint value = 0; + glGetIntegerv(GL_RESET_NOTIFICATION_STRATEGY_ARB, &value); + if (value == GL_LOSE_CONTEXT_ON_RESET_ARB) + format.setOption(QSurfaceFormat::ResetNotification); + } if (format.version() < qMakePair(3, 0)) { format.setOption(QSurfaceFormat::DeprecatedFunctions); @@ -175,7 +177,7 @@ static void updateFormatFromContext(QSurfaceFormat &format) // Version 3.0 onwards - check if it includes deprecated functionality or is // a debug context - value = 0; + GLint value = 0; glGetIntegerv(GL_CONTEXT_FLAGS, &value); if (!(value & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)) format.setOption(QSurfaceFormat::DeprecatedFunctions); |