summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_p.h
diff options
context:
space:
mode:
authorTom Cooksey <thomas.cooksey@nokia.com>2009-08-27 14:08:20 (GMT)
committerTom Cooksey <thomas.cooksey@nokia.com>2009-09-08 16:36:13 (GMT)
commit7c59abc1883a24e54ac3bb2193acc2cac5ad416a (patch)
tree589ab0cedd22197bace46f8b616998de5127b40c /src/opengl/qgl_p.h
parent5a3d0e73121e191fe2f1337ac8f6761c35868b66 (diff)
downloadQt-7c59abc1883a24e54ac3bb2193acc2cac5ad416a.zip
Qt-7c59abc1883a24e54ac3bb2193acc2cac5ad416a.tar.gz
Qt-7c59abc1883a24e54ac3bb2193acc2cac5ad416a.tar.bz2
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/qgl_p.h')
-rw-r--r--src/opengl/qgl_p.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index f8158a0..03532c8 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -62,6 +62,7 @@
#include "QtCore/qatomic.h"
#include "private/qwidget_p.h"
#include "qcache.h"
+#include "qglpaintdevice_p.h"
#ifndef QT_OPENGL_ES_1_CL
#define q_vertexType float
@@ -189,7 +190,8 @@ public:
bool renderCxPm(QPixmap *pixmap);
void cleanupColormaps();
- QGLContext *glcx;
+ QGLContext *glcx; // ### Keep for compatability with QGLDrawable (if that gets left in)
+ QGLWidgetGLPaintDevice glDevice;
bool autoSwap;
QGLColormap cmap;
@@ -337,6 +339,7 @@ Q_SIGNALS:
void aboutToDestroyContext(const QGLContext *context);
};
+#if 0
class QGLPixelBuffer;
class QGLFramebufferObject;
class QWSGLWindowSurface;
@@ -388,6 +391,8 @@ private:
int previous_fbo;
};
+#endif
+
// GL extension definitions
class QGLExtensions {
public: