summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorNick Ratelle <nratelle@qnx.com>2013-10-16 13:24:32 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-10-17 15:58:32 +0200
commite7cf7c1c65ff2379621603742f2b9ae344e40f69 (patch)
tree9bc0c7553877d2b27e7a31c77ba5c88ebb9f098c /src/plugins
parentb329c8ffb960da492d90c7bf70ed93f23fa2d400 (diff)
Blackberry: Cannot create shared egl contexts.
Currently the share context is always set to EGL_NO_CONTEXT when it should instead query the share handle from the QOpenGlContext and pass that to the eglCreateContext call. Change-Id: Ia7e32574e1427fba0f919003e5367cfc98688d9d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/platforms/qnx/qqnxglcontext.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/platforms/qnx/qqnxglcontext.cpp b/src/plugins/platforms/qnx/qqnxglcontext.cpp
index 355f52c46e..34e8150928 100644
--- a/src/plugins/platforms/qnx/qqnxglcontext.cpp
+++ b/src/plugins/platforms/qnx/qqnxglcontext.cpp
@@ -124,7 +124,15 @@ QQnxGLContext::QQnxGLContext(QOpenGLContext *glContext)
if (m_eglConfig == 0)
qFatal("QQnxGLContext: failed to find EGL config");
- m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, EGL_NO_CONTEXT, contextAttrs());
+ EGLContext shareContext = EGL_NO_CONTEXT;
+ if (m_glContext) {
+ QQnxGLContext *qshareContext = dynamic_cast<QQnxGLContext*>(m_glContext->shareHandle());
+ if (qshareContext) {
+ shareContext = qshareContext->m_eglContext;
+ }
+ }
+
+ m_eglContext = eglCreateContext(ms_eglDisplay, m_eglConfig, shareContext, contextAttrs());
if (m_eglContext == EGL_NO_CONTEXT) {
checkEGLError("eglCreateContext");
qFatal("QQnxGLContext: failed to create EGL context, err=%d", eglGetError());