[Qt-interest] QGLWidget 30 fps maximum on Windows XP
andy fillebrown
andy.fillebrown at gmail.com
Wed Jan 19 13:05:14 CET 2011
Yes, I realize all this. If someone would build and test the
qml-scenegraph project on XP to see if the 30 fps ceiling occurs on
their machine, too, it'd be much appreciated. It needs an internal
build of Qt's master branch and the qmlscene project needs CONFIG +=
console removed for it to work on Windows.
Cheers,
~ andy.f
On Wed, Jan 19, 2011 at 5:47 AM, <Oliver.Knoll at comit.ch> wrote:
> On 2011-01-19 ITS-CMT-SL-SFR-FIN-DEV Knoll Oliver, ITS-CMT-SL-SFR-FIN-DEV wrote:
>
>> ...but I think at that time I unblocked the calculation
>> thread each time QWidget::paint() was done,
>
> I actually meant http://doc.qt.nokia.com/4.7/qwidget.html#paintEvent - at this time the widget is really to be repainted, and you know that the GL rendering has finished.
>
> Then you wake-up your "scene calculation thread" (which goes to sleep each time it has re-calculated the scene and emits a (queued!) signal to the GUI, indicating that "there is something new to render") which then calculates the next scene frame.
>
> Like this you don't limit the FPS to some timer interval, but really try to render "as fast as possible" (taking into account the maximum refresh rate of your screen).
>
> Another (simpler) approach, if you really want to stick to a QTimer based approach: start with e.g. 30 FPS, measure the time it actually takes to render a single frame, and if this delta time dt is smaller than 1/30 seconds, then you can decrease the timer interval to e.g. 1/40 seconds (40 FPS), and increase if performance drops etc.
>
> p.s. I seriously doubt that Windows XP itself limits the framerate to 30 FPS: Windows XP has a long (and very successful) "gaming history", and any 1st person shooter gamer will tell you that they reach far higher FPS than just 30 (which is considered very low for hard core 1st person shooter gamers, so I've been told ;) And this is true for both Direct3D and OpenGL based games on WinXP...
>
> --
> Oliver Knoll
> Dipl. Informatik-Ing. ETH
> COMIT AG - ++41 79 520 95 22
>
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at qt.nokia.com
> http://lists.qt.nokia.com/mailman/listinfo/qt-interest
>
More information about the Qt-interest-old
mailing list