summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglframebufferobject_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2011-09-07 10:31:03 +0200
committerPaul Olav Tvete <paul.tvete@nokia.com>2011-09-08 11:07:56 +0200
commit1b1831500142c995137f5e4b1bc03d21aa08e1e1 (patch)
tree5fcd21ee23c37fbe3466fde353d0bcfd09a051e2 /src/gui/opengl/qopenglframebufferobject_p.h
parent68974d8e647febb80a47d9cf6ce9452f3ce4fa21 (diff)
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 <qt_sanity_bot@ovi.com> Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
Diffstat (limited to 'src/gui/opengl/qopenglframebufferobject_p.h')
-rw-r--r--src/gui/opengl/qopenglframebufferobject_p.h24
1 files changed, 1 insertions, 23 deletions
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 <qopenglframebufferobject.h>
-#include <private/qopenglpaintdevice_p.h>
#include <private/qopenglcontext_p.h>
#include <private/qopenglextensions_p.h>
@@ -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; }