summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorReuben Dowle <reuben.dowle@navico.com>2011-09-19 11:04:50 (GMT)
committerSamuel Rødal <samuel.rodal@nokia.com>2011-09-19 11:04:50 (GMT)
commit67a1b5e50c1cc90e9c03d9f4cadc9912f6880e15 (patch)
treec576a499fa9b8b8ee298052e97e7727ad5081006 /src/plugins/platforms
parent035a05e498568cacbc53017d6f7ee6691c050edb (diff)
downloadQt-67a1b5e50c1cc90e9c03d9f4cadc9912f6880e15.zip
Qt-67a1b5e50c1cc90e9c03d9f4cadc9912f6880e15.tar.gz
Qt-67a1b5e50c1cc90e9c03d9f4cadc9912f6880e15.tar.bz2
Allow shared EGL contexts for xcb and xlib platforms
Merge-request: 1331 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/xcb/qxcbwindow.cpp2
-rw-r--r--src/plugins/platforms/xlib/qxlibwindow.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp
index 0a02c7e..ed88138 100644
--- a/src/plugins/platforms/xcb/qxcbwindow.cpp
+++ b/src/plugins/platforms/xcb/qxcbwindow.cpp
@@ -516,7 +516,7 @@ QPlatformGLContext *QXcbWindow::glContext() const
EGLSurface eglSurface = eglCreateWindowSurface(display,config,(EGLNativeWindowType)m_window,0);
QXcbWindow *that = const_cast<QXcbWindow *>(this);
- that->m_context = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API);
+ that->m_context = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API, static_cast<QEGLPlatformContext *>(widget()->platformWindowFormat().sharedGLContext()));
#elif defined(XCB_USE_DRI2)
QXcbWindow *that = const_cast<QXcbWindow *>(this);
that->m_context = new QDri2Context(that);
diff --git a/src/plugins/platforms/xlib/qxlibwindow.cpp b/src/plugins/platforms/xlib/qxlibwindow.cpp
index 823fae9..16c5ed5 100644
--- a/src/plugins/platforms/xlib/qxlibwindow.cpp
+++ b/src/plugins/platforms/xlib/qxlibwindow.cpp
@@ -687,7 +687,7 @@ QPlatformGLContext *QXlibWindow::glContext() const
eglContextAttrs.append(EGL_NONE);
EGLSurface eglSurface = eglCreateWindowSurface(display,config,(EGLNativeWindowType)x_window,0);
- that->mGLContext = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API);
+ that->mGLContext = new QEGLPlatformContext(display, config, eglContextAttrs.data(), eglSurface, EGL_OPENGL_ES_API, static_cast<QEGLPlatformContext *>(windowFormat.sharedGLContext()));
#endif
#endif
}