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>
This commit is contained in:
Nick Ratelle 2013-10-16 13:24:32 -04:00 committed by The Qt Project
parent b329c8ffb9
commit e7cf7c1c65

View File

@ -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());