summaryrefslogtreecommitdiffstats
path: root/src/opengl/qglpixelbuffer_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-09-13 20:50:59 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-09-27 18:35:55 +0200
commitccf0669da933e519edcff03698643e906b5935d5 (patch)
tree7c5d7880f0ef8755aebf9a653eff0a9004330c8c /src/opengl/qglpixelbuffer_p.h
parent2d70dde68a1af355ae10cd6bd34f44006f16918a (diff)
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 <sean.harmer@kdab.com>
Diffstat (limited to 'src/opengl/qglpixelbuffer_p.h')
-rw-r--r--src/opengl/qglpixelbuffer_p.h7
1 files changed, 5 insertions, 2 deletions
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;