summaryrefslogtreecommitdiffstats
path: root/src/opengl/qopenglwindow.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <[email protected]>2025-05-05 14:35:48 +0200
committerTor Arne Vestbø <[email protected]>2025-05-23 17:42:46 +0200
commit4a7ccb65f0065e878c5762db05eca9c5cd6731e5 (patch)
treee737796f54e0dc655185820f3ceed08f0a8f66d7 /src/opengl/qopenglwindow.cpp
parent868fc456acba412f5a1d4a39fa504fc890fda205 (diff)
Lazily create global share context when Qt::AA_ShareOpenGLContexts is set
The requirement to set Qt::AA_ShareOpenGLContexts before creating QGuiApp was forcing users to also set the default surface format before QGuiApp, which prevents us from initializing a default surface format based on the platform integration. By creating the global share context lazily when requested via the Qt::AA_ShareOpenGLContext application attribute we open up this possibility. Change-Id: I958639c997e96321013b1080c31e2533a36c13ff Reviewed-by: Allan Sandfeld Jensen <[email protected]>
Diffstat (limited to 'src/opengl/qopenglwindow.cpp')
-rw-r--r--src/opengl/qopenglwindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qopenglwindow.cpp b/src/opengl/qopenglwindow.cpp
index 6b74aaedd70..05330dda0a4 100644
--- a/src/opengl/qopenglwindow.cpp
+++ b/src/opengl/qopenglwindow.cpp
@@ -161,7 +161,7 @@ public:
, shareContext(shareContext)
{
if (!shareContext)
- this->shareContext = qt_gl_global_share_context();
+ this->shareContext = QOpenGLContext::globalShareContext();
}
~QOpenGLWindowPrivate();