summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-02 14:50:58 (GMT)
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-09-02 14:50:58 (GMT)
commit8b52b03577321946c8b597f29c294c6aab978c49 (patch)
tree9ab2dc325a9b76d697ac334b05a7e9bac64ac395 /src/opengl
parent7421f8234a77f358479099e40ce336d1863fedb1 (diff)
downloadQt-8b52b03577321946c8b597f29c294c6aab978c49.zip
Qt-8b52b03577321946c8b597f29c294c6aab978c49.tar.gz
Qt-8b52b03577321946c8b597f29c294c6aab978c49.tar.bz2
Fixed bug where QGLContext::isSharing() returned false while sharing.
When creating a QGLPixelBuffer with context sharing, the sharing flag was only set on the pixel buffer, not the other context. Reviewed-by: Trond
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qglpixelbuffer.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index 54d54e9..f082ff0 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -110,8 +110,10 @@ void QGLPixelBufferPrivate::common_init(const QSize &size, const QGLFormat &form
invalid = false;
qctx = new QGLContext(format);
qctx->d_func()->sharing = (shareWidget != 0);
- if (shareWidget != 0 && shareWidget->d_func()->glcx)
+ if (shareWidget != 0 && shareWidget->d_func()->glcx) {
qgl_share_reg()->addShare(qctx, shareWidget->d_func()->glcx);
+ shareWidget->d_func()->glcx->d_func()->sharing = true;
+ }
qctx->d_func()->paintDevice = q;
qctx->d_func()->valid = true;