From c625d923853d01ad668dd3e8ebd55b7e5a6bcdb8 Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Mon, 2 Dec 2019 10:27:02 +0100 Subject: Fix depth in renderText() Fixes: QTBUG-31156 Change-Id: I3cbb3f9c5dfbcb182dbe283b0bf0f05a031970a5 Reviewed-by: Paul Olav Tvete --- src/opengl/qgl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 2c5a40a992..2d7b0280d8 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -4962,7 +4962,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(p->paintEngine())->setTranslateZ(-win_z); + static_cast(p->paintEngine())->setTranslateZ(-2 * win_z); qt_gl_draw_text(p, qRound(win_x), qRound(win_y), str, font); -- cgit v1.2.3