glRasterPos is slower on QT4.8 than QT3.3.6

I try to render thousands of words in QGLWidget with QT4.8.0 and is much slower than on QT3.3.6. I discover than glRasterPos is slower from QT3.3.6 to QT4.8.0.

Any Ideas?

Thanks in advance, Ironexmaiden.

QT does not reimplement OpenGL but provides some OpenGL related functionalities (beside providing a widget with an OpenGL context).
I know that the support of QT for OpenGL is (sadly) not the best (3.2 core profile creation on Lion, missing ARB_Debug_Output support etc.) but plain OpenGL calls like glRasterPos should not get affected.
Have you outruled all other possible sources of the slowdown (same machine, same rendering code, equivalent context setup)?

I call these functions to render the words

GL VERSION -> 3.2
GL RENDERER -> GeForce GTX 470
OS -> fedora core 14 64bit

glRasterPos3f(x, y, z);
glListBase(number);
glCallLists(strlen(String), GL_UNSIGNED_BYTE, String);

I try to code a simple code example with QT3.3.6 and QT4.8 the result was exactly the same. I tried this code on several linux OS machines with no luck. On windows 7 speed is fine though … weird…

Big mistake I just realize that glCallLists is the function that slows down the system. :frowning:

I’ve seen cases where moving from naive display lists to well sorted (minimizing states) VBO based draw calls can increase rendering by orders of magnitudes.
However, your problem is not the speed of displaylists itself but that they are slower in combination with a different windowing toolkit. That’s strange (unless QT intercepts displaylists and does something weired what i wouldn’t expect).

Strange, anyone an idea?

In my first idea, I would say that Qt 4 is more slow than Qt 3. So the frequecies the loops are happening are less frequent, and so the rendering is more slow.

But depending on how the timers are done, another explanation would be that you don’t create the display lists with the same font, so time differs.

My last idea is that the tests are made on different systems…

Finally, Qt is bad. It has been made slow by design (the way it defines and manages events is slow compared to other toolkits like Gtk or wxwidget).