PDA

View Full Version : glRasterPos is slower on QT4.8 than QT3.3.6



ironexmaiden
02-10-2012, 02:48 AM
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.

menzel
02-10-2012, 02:58 AM
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)?

ironexmaiden
02-10-2012, 03:10 AM
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...

ironexmaiden
02-10-2012, 06:42 AM
Big mistake I just realize that glCallLists is the function that slows down the system. :(

menzel
02-10-2012, 09:27 AM
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?

_arts_
02-14-2012, 05:16 AM
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).