summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpixelbuffer.cpp
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-08-31 11:28:14 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 16:36:14 (GMT)
commitb7963df603a315136b32297b861f089c0cd49acd (patch)
tree797d95a3be461b1b76585cf67a09a02ae092f184 /src/opengl/qglpixelbuffer.cpp
parent7c59abc1883a24e54ac3bb2193acc2cac5ad416a (diff)
downloadQt-b7963df603a315136b32297b861f089c0cd49acd.zip
Qt-b7963df603a315136b32297b861f089c0cd49acd.tar.gz
Qt-b7963df603a315136b32297b861f089c0cd49acd.tar.bz2
Make QGLPixelBuffer work again using new QGLPaintDevice API
Add a new QGLPBufferGLPaintDevice implementation which allows the GL engines to target QGLPixelBuffers again.
Diffstat (limited to 'src/opengl/qglpixelbuffer.cpp')
-rw-r--r--src/opengl/qglpixelbuffer.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index f082ff0..f7cb3cc 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -100,6 +100,13 @@ void qgl_cleanup_glyph_cache(QGLContext *) {}
extern QImage qt_gl_read_framebuffer(const QSize&, bool, bool);
+
+void QGLPBufferGLPaintDevice::setPBuffer(QGLPixelBuffer* pb)
+{
+ pbuf = pb;
+ setContext(pb->d_func()->qctx);
+}
+
void QGLPixelBufferPrivate::common_init(const QSize &size, const QGLFormat &format, QGLWidget *shareWidget)
{
Q_Q(QGLPixelBuffer);
@@ -115,6 +122,7 @@ void QGLPixelBufferPrivate::common_init(const QSize &size, const QGLFormat &form
shareWidget->d_func()->glcx->d_func()->sharing = true;
}
+ glDevice.setPBuffer(q);
qctx->d_func()->paintDevice = q;
qctx->d_func()->valid = true;
#if defined(Q_WS_WIN) && !defined(QT_OPENGL_ES)