[osg-users] Strange limitation to 60fps
Alistair Baxter
alistair at mve.com
Mon Jan 30 03:07:49 PST 2017
It sounds like you have "vertical sync" enabled, that prevents your GPU updating faster than the refresh rate of your display device.
This can be toggled off in Qt by calling setSwapInterval in the QSurfaceFormat or QGLFormat you can pass to Qt to specify OpenGL settings. Please be aware though, that like many of the properties of these format objects, the system may or may not choose to give you what you ask for. Some systems may not allow you to turn vsync off.
If you're only interested in display of graphics, though, rather than benchmarking, at 60fps you are getting as fast an update as your screen is capable of showing.
-----Original Message-----
From: osg-users [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Valerian Merkling
Sent: 30 January 2017 10:32
To: osg-users at lists.openscenegraph.org
Subject: [osg-users] Strange limitation to 60fps
Hi,
I'm working on a GIS app with QT 5.5 and OSG 3.4.0. My test platform is windows 7 pro 64bits, but i'm building my app in 32bits.
I'm currently trying to improve performance a bit and I'm facing a problem that I can't understand.
I'm using OsgQT to make a OSG Widget and draw my scene inside. This widget has a CompositeViewer, and I call its frame() function when needed (I'm not using the compositeViewer.run() function). "When needed" include the widget repaint function and a Qt Timer.
The StatsHandler shows me that I can never get more than 60.00 fps.
I'm mostly running at 59.96 or somethings like this, event with a small windows, basic textured quad and a NVidia quadro K4000.
I made lot's of test and tweaks, and I cannot got more than 60.00fps.
Even with a loop around the frame() call, my statshandler graph looks like OSG is waiting between each frame to keep at 60.00fps.
It's not that I really want to get more than 60fps, but I really want to understand what is happening here.
So is there anythings in OSG that artificially limit it's framerate inside the compositeViewer.frame() function ?
After a deep look at the code I wasn't able to find any clue, as the setRunFrameScheme and setRunMaxFrameRate seems to only be used in the run() function.
Thank you!
Cheers,
Valerian
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=70068#70068
More information about the osg-users
mailing list