PDA

View Full Version : OpenGL text rendering not working!! Unable to resolve glProgramParameteri



nsvinc
15th August 2013, 23:00
Working with QGLWidget.

After hours spent at looking for the reason, why QPainter can draw pixels, lines and polygons, but cannot draw text, i copied 1:1 the example project "Sample buffers", ran it, only to see that it is not working either.

The issue applies to both QPainter painting on a QGLWidget and native OpenGL painting on a QGLWidget. Both can paint virtually anything without errors, but not text.
In the example project, when I comment out


//renderText(-0.35, 0.4, 0.0, "Multisampling enabled");
//renderText(0.15, 0.4, 0.0, "Multisampling disabled");

it works nice and I can see the image which I should see, without the text, of course. And the program closes normal...

But when these lines are not commented out, I see a empty, plain white window without any drawing. And when I close the program, it throws a segfault.

When using functions for text drawing, I get on the debug console three times "getProcAddress: Unable to resolve 'glProgramParameteri' ". Both in the example and in my own program.

Is this a hardware/driver issue or is something wrong with Qt?

suese
17th February 2014, 09:43
I got the same question with you.What I confuse is it is OK in qt4, but come in qt5.

kemiisto
27th March 2014, 18:09
I have the same issue. With Qt 4 void QGLWidget::renderText(double x, double y, double z, const QString & str, const QFont & font = QFont()) works fine, but not with Qt 5.
Any advice?