diff options
Diffstat (limited to 'src/gui/rhi/qrhigles2.cpp')
-rw-r--r-- | src/gui/rhi/qrhigles2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 523269740c..e611bde2f3 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -484,6 +484,8 @@ bool QRhiGles2::create(QRhi::Flags flags) } else if (QOpenGLContext *shareContext = qt_gl_global_share_context()) { ctx->setShareContext(shareContext); ctx->setScreen(shareContext->screen()); + } else if (maybeWindow) { + ctx->setScreen(maybeWindow->screen()); } if (!ctx->create()) { qWarning("QRhiGles2: Failed to create context"); |