[Interest] QOpenGLWidget and text

Yves Bailly Yves.Bailly at verosoftware.com
Wed Apr 1 16:55:54 CEST 2015


-----Original Message-----
Sent: Wednesday, April 01, 2015 3:42 PM
To: interest at qt-project.org
Subject: [Interest] QOpenGLWidget and text

> I've been working on porting a Qt4 GL application to Qt5, using the new QOpenGL classes instead of the old and deprecated QGL classes.
> Some of it was really easy. Some of it is requiring MASSIVE amounts of work.
> I refer specifically to the removal of the text rendering methods. Since these are removed, what is the easiest way to go about drawing non-scaled, billboarded text in a GL scene? (Note: I am on Qt 5.4 at present; no Qt3D.)

You can use a QPainter to draw on a QOpenGLWidget. You can even create a QLabel having the QOpenGLWidget as parent. This is if you need to draw the text over the 3D scene.

Hope this helps.


More information about the Interest mailing list