From 8b52b03577321946c8b597f29c294c6aab978c49 Mon Sep 17 00:00:00 2001 From: Kim Motoyoshi Kalland Date: Wed, 2 Sep 2009 16:50:58 +0200 Subject: 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 --- src/opengl/qglpixelbuffer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v0.12