[Interest] QOpenGLWidget and text

Matthew Woehlke mw_triad at users.sourceforge.net
Wed Apr 1 15:42:06 CEST 2015


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.)

If I go the route of pre-rendering the text into a QImage, what is the
easiest way, using only the modern QOpenGL classes (since there is no
longer bindTexture either), to get that into an OpenGL texture?

Actually using this stuff in anger, I am finding myself less than
convinced that the new class is an improvement... implicit context
sharing is nice, but the loss of convenience methods is really, really
painful. (And I'll include qgl[Clear]Color in that list...)

-- 
Matthew




More information about the Interest mailing list