aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2018-01-11 13:21:05 +0100
committerJani Heikkinen <jani.heikkinen@qt.io>2018-01-12 05:06:00 +0000
commit2b8bc44a88490d359b986ecfbf7c71d8216daa4c (patch)
tree4add34c7ff23ce6a18c48ea470de9f438e56546d
parent323f4886dcb99c419568802b96db88ddc9cba111 (diff)
Don't recreate QOpenGLContext when the application is sharing contexts
Task-number: QTBUG-63304 Change-Id: Idfefb246a15166e04c0db0c894a705a7be2ecf67 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/quickwidgets/qquickwidget.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quickwidgets/qquickwidget.cpp b/src/quickwidgets/qquickwidget.cpp
index df28ff964a..fd1ae52298 100644
--- a/src/quickwidgets/qquickwidget.cpp
+++ b/src/quickwidgets/qquickwidget.cpp
@@ -934,7 +934,7 @@ void QQuickWidget::createFramebufferObject()
}
QOpenGLContext *shareWindowContext = QWidgetPrivate::get(window())->shareContext();
- if (shareWindowContext && context->shareContext() != shareWindowContext) {
+ if (shareWindowContext && context->shareContext() != shareWindowContext && !qGuiApp->testAttribute(Qt::AA_ShareOpenGLContexts)) {
context->setShareContext(shareWindowContext);
context->setScreen(shareWindowContext->screen());
if (!context->create())