summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp')
-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;
}