diff options
author | Bill King <bill.king@nokia.com> | 2009-12-17 03:48:55 (GMT) |
---|---|---|
committer | Bill King <bill.king@nokia.com> | 2009-12-17 03:48:55 (GMT) |
commit | b745c926f6fceed7a7d7078c0923bb8ab8e3019c (patch) | |
tree | 33d9224ff0378ea00fd0e12d1574a787100a2cd1 | |
parent | c7d3627141c5d92f18ee18f22d70cdd60415ac15 (diff) | |
parent | 7371d787d9b2667132c0caadb9964189b1d8c9fc (diff) | |
download | Qt-b745c926f6fceed7a7d7078c0923bb8ab8e3019c.zip Qt-b745c926f6fceed7a7d7078c0923bb8ab8e3019c.tar.gz Qt-b745c926f6fceed7a7d7078c0923bb8ab8e3019c.tar.bz2 |
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6
-rw-r--r-- | src/opengl/qgl.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 32534aa..466e851 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4302,6 +4302,7 @@ static void qt_save_gl_state() glDisable(GL_CULL_FACE); glDisable(GL_LIGHTING); glDisable(GL_STENCIL_TEST); + glDisable(GL_DEPTH_TEST); glEnable(GL_BLEND); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); } @@ -4355,6 +4356,10 @@ static void qt_gl_draw_text(QPainter *p, int x, int y, const QString &str, \note This function clears the stencil buffer. \note This function is not supported on OpenGL/ES systems. + + \note This function temporarily disables depth-testing when the + text is drawn. + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. */ @@ -4445,6 +4450,13 @@ void QGLWidget::renderText(int x, int y, const QString &str, const QFont &font, have the labels move with the model as it is rotated etc. \note This function is not supported on OpenGL/ES systems. + + \note If depth testing is enabled before this function is called, + then the drawn text will be depth-tested against the models that + have already been drawn in the scene. Use \c{glDisable(GL_DEPTH_TEST)} + before calling this function to annotate the models without + depth-testing the text. + \l{Overpainting Example}{Overpaint} with QPainter::drawText() instead. */ void QGLWidget::renderText(double x, double y, double z, const QString &str, const QFont &font, int) |