Fix depth in renderText()

Fixes: QTBUG-31156
Change-Id: I3cbb3f9c5dfbcb182dbe283b0bf0f05a031970a5
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
bb10
Laszlo Agocs 2019-12-02 10:27:02 +01:00
parent 580fd2dbd3
commit c625d92385
1 changed files with 1 additions and 1 deletions

View File

@ -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<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);