summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 12:58:48 +1000
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-11-09 12:58:48 +1000
commit09a123c7f9df37f82a4baab0e7ec70ebfe5444d3 (patch)
treeb3776844cbee3c3223b54d7cd836e3c1d75fbb9a /src/opengl
parentf89fc92d1da06964a890e7800caeab62579a0fb4 (diff)
Mark both the new and original EGL contexts as sharing
If we succeed in creating a shared context, then mark the original as shared as well. Reviewed-by: Sarah Smith
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qgl_qws.cpp2
-rw-r--r--src/opengl/qgl_wince.cpp2
-rw-r--r--src/opengl/qgl_x11egl.cpp2
3 files changed, 6 insertions, 0 deletions
diff --git a/src/opengl/qgl_qws.cpp b/src/opengl/qgl_qws.cpp
index de9c6aea4e..a189c20fed 100644
--- a/src/opengl/qgl_qws.cpp
+++ b/src/opengl/qgl_qws.cpp
@@ -207,6 +207,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
return false;
}
d->sharing = d->eglContext->isSharing();
+ if (d->sharing && shareContext)
+ const_cast<QGLContext *>(shareContext)->d_func()->sharing = true;
#if defined(EGL_VERSION_1_1)
if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget)
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index 86fe3ba149..2553110102 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -167,6 +167,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
return false;
}
d->sharing = d->eglContext->isSharing();
+ if (d->sharing && shareContext)
+ const_cast<QGLContext *>(shareContext)->d_func()->sharing = true;
#if defined(EGL_VERSION_1_1)
if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget)
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 5325451494..b51c23998c 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -116,6 +116,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
return false;
}
d->sharing = d->eglContext->isSharing();
+ if (d->sharing && shareContext)
+ const_cast<QGLContext *>(shareContext)->d_func()->sharing = true;
#if defined(EGL_VERSION_1_1)
if (d->glFormat.swapInterval() != -1 && devType == QInternal::Widget)