summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-09-25 15:20:50 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-10-06 13:36:19 (GMT)
commitaaf695a3fad8d84f3d9483a573732350445d453a (patch)
treebafcdff4c882d05f35a8b70ae187be33dca4e053 /src
parentaf8ff76bf25b6b4d01d89bea42baab65ed7e09ea (diff)
downloadQt-aaf695a3fad8d84f3d9483a573732350445d453a.zip
Qt-aaf695a3fad8d84f3d9483a573732350445d453a.tar.gz
Qt-aaf695a3fad8d84f3d9483a573732350445d453a.tar.bz2
Made GL 2 paint engine waste less bits in clipping algorithm.
Diffstat (limited to 'src')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 17b4808..c0959ae 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1710,7 +1710,7 @@ void QGL2PaintEngineExPrivate::writeClip(const QVectorPath &path, uint depth)
updateMatrix();
if (q->state()->needsDepthBufferClear) {
glDepthMask(true);
- glClearDepth(rawDepth(2));
+ glClearDepth(rawDepth(1));
glClear(GL_DEPTH_BUFFER_BIT);
q->state()->needsDepthBufferClear = false;
glDepthMask(false);
@@ -1872,8 +1872,8 @@ void QGL2PaintEngineExPrivate::systemStateChanged()
q->state()->depthTestEnabled = false;
q->state()->needsDepthBufferClear = true;
- q->state()->currentDepth = 1;
- maxDepth = 4;
+ q->state()->currentDepth = 0;
+ maxDepth = 1;
q->state()->rectangleClip = use_system_clip ? systemClip.boundingRect() : QRect(0, 0, width, height);
updateDepthScissorTest();
@@ -1901,7 +1901,7 @@ void QGL2PaintEngineExPrivate::systemStateChanged()
path.addRegion(systemClip);
glDepthFunc(GL_ALWAYS);
- writeClip(qtVectorPathForPath(q->state()->matrix.inverted().map(path)), 2);
+ writeClip(qtVectorPathForPath(q->state()->matrix.inverted().map(path)), 1);
glDepthFunc(GL_LESS);
glEnable(GL_DEPTH_TEST);
@@ -1987,7 +1987,6 @@ QOpenGL2PaintEngineState::QOpenGL2PaintEngineState()
{
needsDepthBufferClear = true;
depthTestEnabled = false;
- currentDepth = 1;
canRestoreClip = true;
}