summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-07-01 12:40:51 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-07-01 12:44:25 (GMT)
commit66a281ab76303074cd9cbb6cd22dcc5f3dbe8454 (patch)
tree1f42218c513a327d85ff408297879297c78a23f1 /src/opengl/gl2paintengineex
parent7bf505a54379388b292df528114d6e2dd8d9d4d4 (diff)
downloadQt-66a281ab76303074cd9cbb6cd22dcc5f3dbe8454.zip
Qt-66a281ab76303074cd9cbb6cd22dcc5f3dbe8454.tar.gz
Qt-66a281ab76303074cd9cbb6cd22dcc5f3dbe8454.tar.bz2
Made QPainter / OpenGL intermixing in hellogl_es2 work properly again.
Need to call syncState() to let the paint engine set depth clipping state parameters back to their OpenGL defaults. Reviewed-by: Trond
Diffstat (limited to 'src/opengl/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index edc7c44..f261ca2 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -676,6 +676,11 @@ void QGL2PaintEngineEx::sync()
glDisable(GL_BLEND);
glActiveTexture(GL_TEXTURE0);
+ glDisable(GL_DEPTH_TEST);
+ glDepthFunc(GL_LESS);
+ glDepthMask(true);
+ glClearDepth(1);
+
d->needsSync = true;
}