summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2019-12-02 10:27:02 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2019-12-09 12:32:51 +0100
commitd96bbd999fbd31687e4998705300ccdb5c4bcac4 (patch)
treeb58fda5fc54364ea1f189f10642af321e84b9b6c /src
parentb8e404f6d0631e04d30a864dc68b0574bfca90f1 (diff)
Fix depth in renderText()
Fixes: QTBUG-31156 Change-Id: I3cbb3f9c5dfbcb182dbe283b0bf0f05a031970a5 Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io> (cherry picked from commit c625d923853d01ad668dd3e8ebd55b7e5a6bcdb8)
Diffstat (limited to 'src')
-rw-r--r--src/opengl/qgl.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index ba4a1dcaa1..35dd3057e1 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -4979,7 +4979,7 @@ void QGLWidget::renderText(double x, double y, double z, const QString &str, con
// The only option in Qt 5 is the shader-based OpenGL 2 paint engine.
// Setting fixed pipeline transformations is futile. Instead, pass the
// extra values directly and let the engine figure the matrices out.
- static_cast<QGL2PaintEngineEx *>(p->paintEngine())->setTranslateZ(-win_z);
+ static_cast<QGL2PaintEngineEx *>(p->paintEngine())->setTranslateZ(-2 * win_z);
qt_gl_draw_text(p, qRound(win_x), qRound(win_y), str, font);