summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2009-08-28 11:28:43 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2009-08-28 13:47:02 (GMT)
commit033725f5947d4a4e0c21f426664851b42b164d08 (patch)
treecec7e8b079de65251ce5ac099304068b95f32103 /src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
parentdf66f388bb135d7f22632d7d98ffa0e4d8a417f3 (diff)
downloadQt-033725f5947d4a4e0c21f426664851b42b164d08.zip
Qt-033725f5947d4a4e0c21f426664851b42b164d08.tar.gz
Qt-033725f5947d4a4e0c21f426664851b42b164d08.tar.bz2
Fixed QGLWidget::renderText() when using the GL 2 paint engine.
QGLWidget::renderText() needs to respect the current depth and scissor tests that the user has set. Therefore we needs some special casing in the GL 2 paint engine to handle the custom depth testing. The private setRenderTextActive() has been added for this purpose. Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
index 66e7a51..68447bc 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2_p.h
@@ -141,6 +141,8 @@ public:
QPixmapFilter *createPixmapFilter(int type) const;
+ void setRenderTextActive(bool);
+
private:
Q_DISABLE_COPY(QGL2PaintEngineEx)
};
@@ -156,7 +158,8 @@ public:
ctx(0),
currentBrush(0),
inverseScale(1),
- shaderManager(0)
+ shaderManager(0),
+ inRenderText(false)
{ }
~QGL2PaintEngineExPrivate();
@@ -191,6 +194,8 @@ public:
inline void useSimpleShader();
inline QColor premultiplyColor(QColor c, GLfloat opacity);
+ float zValueForRenderText() const;
+
QGL2PaintEngineEx* q;
QGLDrawable drawable;
int width, height;
@@ -240,6 +245,7 @@ public:
GLuint lastTexture;
bool needsSync;
+ bool inRenderText;
};
QT_END_NAMESPACE