summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-08-27 16:08:20 +0200
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 18:36:13 +0200
commit7c59abc1883a24e54ac3bb2193acc2cac5ad416a (patch)
tree589ab0cedd22197bace46f8b616998de5127b40c /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
parent5a3d0e73121e191fe2f1337ac8f6761c35868b66 (diff)
Replace QGLDrawable with a new QGLPaintDevice
This patch adds a new abstract base class which inherits from QPaintDevice called QGLPaintDevice. This base class will contain everything the GL paint engines need to know about the surface they are drawing onto. As such, new surfaces can be targeted by the GL paint engines without having to modify QtOpenGL. This is very useful for plugins, specifically QGraphicsSystem plugins. To unify things a little, the GL paint engines will use the same QGLPaintDevice API to render into existing target surfaces (QGLWidget, QGLPixelBuffer & QGLFrameBufferObject). Ideally we'd make QGLPaintDevice a common ancestor for these surfaces, but obviously that wil break B/C. This patch only implements QGLWidget using the new interface. Rendering to other surfaces will be fixed in following patches.
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index cb23b11dda..2fbee1b5e6 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -58,6 +58,7 @@
#include <private/qpaintengineex_p.h>
#include <private/qglengineshadermanager_p.h>
#include <private/qgl2pexvertexarray_p.h>
+#include <private/qglpaintdevice_p.h>
enum EngineMode {
ImageDrawingMode,
@@ -199,7 +200,7 @@ public:
static QGLEngineShaderManager* shaderManagerForEngine(QGL2PaintEngineEx *engine) { return engine->d_func()->shaderManager; }
QGL2PaintEngineEx* q;
- QGLDrawable drawable;
+ QGLPaintDevice* device;
int width, height;
QGLContext *ctx;
EngineMode mode;