From 1b1831500142c995137f5e4b1bc03d21aa08e1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 7 Sep 2011 10:31:03 +0200 Subject: Improved and made public the QOpenGLPaintDevice API. The new API is more flexible, allowing the use of QOpenGLPaintDevice with any QOpenGLContext, and putting more responsibility on the user for ensuring the correct FBO is current (the user knows best anyhow). Task-number: QTBUG-21263 Change-Id: I50b954125f552baef52fbb3fe2ed907a11ad519c Reviewed-on: http://codereview.qt-project.org/4325 Reviewed-by: Qt Sanity Bot Reviewed-by: Paul Olav Tvete --- src/gui/opengl/qopenglframebufferobject_p.h | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to 'src/gui/opengl/qopenglframebufferobject_p.h') diff --git a/src/gui/opengl/qopenglframebufferobject_p.h b/src/gui/opengl/qopenglframebufferobject_p.h index 6ea6eb26ee..93a8bbf32f 100644 --- a/src/gui/opengl/qopenglframebufferobject_p.h +++ b/src/gui/opengl/qopenglframebufferobject_p.h @@ -58,7 +58,6 @@ QT_BEGIN_NAMESPACE QT_BEGIN_INCLUDE_NAMESPACE #include -#include #include #include @@ -109,31 +108,12 @@ public: uint mipmap : 1; }; -class QOpenGLFBOGLPaintDevice : public QOpenGLPaintDevice -{ -public: - virtual QPaintEngine* paintEngine() const {return fbo->paintEngine();} - virtual QSize size() const {return fbo->size();} - virtual QSurfaceFormat format() const {return fboFormat;} - virtual QOpenGLContextGroup *group() const; - virtual bool alphaRequested() const { return reqAlpha; } - - void setFBO(QOpenGLFramebufferObject* f, - QOpenGLFramebufferObject::Attachment attachment); - -private: - QOpenGLFramebufferObject* fbo; - QSurfaceFormat fboFormat; - bool wasBound; - bool reqAlpha; -}; - class QOpenGLFramebufferObjectPrivate { public: QOpenGLFramebufferObjectPrivate() : fbo_guard(0), texture_guard(0), depth_buffer_guard(0) , stencil_buffer_guard(0), color_buffer_guard(0) - , valid(false), engine(0) {} + , valid(false) {} ~QOpenGLFramebufferObjectPrivate() {} void init(QOpenGLFramebufferObject *q, const QSize& sz, @@ -151,8 +131,6 @@ public: QOpenGLFramebufferObjectFormat format; uint valid : 1; QOpenGLFramebufferObject::Attachment fbo_attachment; - mutable QPaintEngine *engine; - QOpenGLFBOGLPaintDevice glDevice; QOpenGLExtensions funcs; inline GLuint fbo() const { return fbo_guard ? fbo_guard->id() : 0; } -- cgit v1.2.3