From ccf0669da933e519edcff03698643e906b5935d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 13 Sep 2012 20:50:59 +0200 Subject: Added QGLPixelBuffer implementation using framebuffer objects. Instead of having QGLPixelBuffer be a unusable stub implementation we deprecate it and implement it in terms of QOpenGLFramebufferObject. Framebuffer objects are anyway the recommended replacement for pixelbuffers in modern OpenGL, as the context switching overhead is avoided. Change-Id: Ia220c358ee92813e87981d297c51d84525010322 Reviewed-by: Sean Harmer --- src/opengl/qglpixelbuffer_p.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/opengl/qglpixelbuffer_p.h') diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h index 6e8d6d7301..fd20cee07a 100644 --- a/src/opengl/qglpixelbuffer_p.h +++ b/src/opengl/qglpixelbuffer_p.h @@ -60,7 +60,7 @@ QT_BEGIN_NAMESPACE class QEglContext; - +class QOpenGLFramebufferObject; class QGLPBufferGLPaintDevice : public QGLPaintDevice { @@ -77,7 +77,7 @@ private: class QGLPixelBufferPrivate { Q_DECLARE_PUBLIC(QGLPixelBuffer) public: - QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), pbuf(0), ctx(0) + QGLPixelBufferPrivate(QGLPixelBuffer *q) : q_ptr(q), invalid(true), qctx(0), widget(0), fbo(0), blit_fbo(0), pbuf(0), ctx(0) { } bool init(const QSize &size, const QGLFormat &f, QGLWidget *shareWidget); @@ -88,6 +88,9 @@ public: bool invalid; QGLContext *qctx; QGLPBufferGLPaintDevice glDevice; + QGLWidget *widget; + QOpenGLFramebufferObject *fbo; + QOpenGLFramebufferObject *blit_fbo; QGLFormat format; QGLFormat req_format; -- cgit v1.2.3