diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-05-07 19:14:23 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-05-21 19:33:41 +0000 |
commit | eb2ea7098512bdc241b7fdabf5c21c229d56fc07 (patch) | |
tree | 2427f84651fafdb851ca9ecce38791023eecf137 /src | |
parent | 65a28bb1cd871d9332bc0734bc0a2f1a1e1bbeab (diff) |
Fix basic and windows render loops to use the correct screen
GLX, and potentially other platforms too, require that compatible
contexts and surfaces are created with the same screen.
This makes Quick functional on X.org configurations where each
physical screen represents a separate X screen on the same X display.
Change-Id: I03c87819e1aee148c880a3caca13d4a0c5409056
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/scenegraph/qsgrenderloop.cpp | 1 | ||||
-rw-r--r-- | src/quick/scenegraph/qsgwindowsrenderloop.cpp | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp index 781e82fbc4..ec9c3c39f9 100644 --- a/src/quick/scenegraph/qsgrenderloop.cpp +++ b/src/quick/scenegraph/qsgrenderloop.cpp @@ -320,6 +320,7 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window) if (!gl) { gl = new QOpenGLContext(); gl->setFormat(window->requestedFormat()); + gl->setScreen(window->screen()); if (qt_gl_global_share_context()) gl->setShareContext(qt_gl_global_share_context()); if (!gl->create()) { diff --git a/src/quick/scenegraph/qsgwindowsrenderloop.cpp b/src/quick/scenegraph/qsgwindowsrenderloop.cpp index 309e877dae..c571e60018 100644 --- a/src/quick/scenegraph/qsgwindowsrenderloop.cpp +++ b/src/quick/scenegraph/qsgwindowsrenderloop.cpp @@ -162,6 +162,7 @@ void QSGWindowsRenderLoop::show(QQuickWindow *window) RLDEBUG(" - creating GL context"); m_gl = new QOpenGLContext(); m_gl->setFormat(window->requestedFormat()); + m_gl->setScreen(window->screen()); if (qt_gl_global_share_context()) m_gl->setShareContext(qt_gl_global_share_context()); bool created = m_gl->create(); |