[Qt-interest] QGLWidget Starving Application Event Handler

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Apr 8 09:10:23 CEST 2010


Marc Zinck wrote on Wednesday, April 07, 2010 6:15 PM:

> ...
> myQGLWidget has a signal called renderingComplete() which is emited
> at the end of paintGL().  The main application connects this signal
> to a function which updates a label with the current fps value from
> myQGLWidget by calling myQGLWidget::getFps().   

See e.g. http://lists.trolltech.com/qt-interest/2005-03/thread00136-0.html for a similar discussion. I timed the elapsed time in paintEvent() (instead of in paintGL()), because at that time OpenGL has really finished the rendering (since Qt is now ready to paint). But you get more accurate results by sampling every 100-th frame or so, as Richard did (see previous link).

Again, just some random thoughts, doesn't really answer your question...

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list