summaryrefslogtreecommitdiffstats
path: root/src/gui/egl/qegl.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 02:17:42 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 02:17:42 (GMT)
commitf89fc92d1da06964a890e7800caeab62579a0fb4 (patch)
treea04a9104c912b93b84d56e9a5b07a88935cd7e74 /src/gui/egl/qegl.cpp
parentb48ae5932131b6d0934a50846cad441f6e9f5ccd (diff)
downloadQt-f89fc92d1da06964a890e7800caeab62579a0fb4.zip
Qt-f89fc92d1da06964a890e7800caeab62579a0fb4.tar.gz
Qt-f89fc92d1da06964a890e7800caeab62579a0fb4.tar.bz2
Detect context sharing on EGL systems
Context sharing was enabled on EGL systems, but QGLContext::isSharing() was still returning false because the flag in QGLContextPrivate was not updated. Reviewed-by: Sarah Smith
Diffstat (limited to 'src/gui/egl/qegl.cpp')
-rw-r--r--src/gui/egl/qegl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp
index 39291d3..c0e4890 100644
--- a/src/gui/egl/qegl.cpp
+++ b/src/gui/egl/qegl.cpp
@@ -62,6 +62,7 @@ QEglContext::QEglContext()
, currentSurface(EGL_NO_SURFACE)
, current(false)
, ownsContext(true)
+ , sharing(false)
{
}
@@ -174,6 +175,7 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties
if (apiType == QEgl::OpenGL)
contextProps.setValue(EGL_CONTEXT_CLIENT_VERSION, 2);
#endif
+ sharing = false;
if (shareContext && shareContext->ctx == EGL_NO_CONTEXT)
shareContext = 0;
if (shareContext) {
@@ -181,6 +183,8 @@ bool QEglContext::createContext(QEglContext *shareContext, const QEglProperties
if (ctx == EGL_NO_CONTEXT) {
qWarning() << "QEglContext::createContext(): Could not share context:" << errorString(eglGetError());
shareContext = 0;
+ } else {
+ sharing = true;
}
}
if (ctx == EGL_NO_CONTEXT) {