Jump to content
  • Advertisement
Sign in to follow this  
zacaj

OpenGL Not Fullscreen app not getting past 60FPS

This topic is 2551 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I just got my development suite setup on my laptop (nvidia, win7x64), and my opengl application (not fullscreen) doesnt seem to get past ~60FPS +-2. I know there can sometimes be problems in fullscreen apps with the refresh rate of the screen, but I thought those didnt apply in windowed apps. My current best guess it that it has something to do with the nvidia drivers, since my desktop is ATI, and it gets 1000+ FPS in windowed mode. Ive tried removing all the objects from the scene, and also adding lots of objects, and the FPS doesnt change till I add a lot of objects, which leads me to beleive its something outside of the app thats limiting the FPS.
I dont really care either way, but I need a way to get accurate timings for optimization. My current technique is just to get the time once a frame, subtract from the previous time, and use that to calculate FPS+MSPF. This, of course, includes glfwSwapBuffers(), which is taking about 10% of execution time according to the profiler. But, if I remove this from the timed section, I dont think Ill get good timing taking GPU rendering time into account, which I think I was getting before(unless Im misunderstanding the parallelism of the GPU?) Is there a way to get it unlimited, or a better way to measure timing?

Share this post


Link to post
Share on other sites
Advertisement

I just got my development suite setup on my laptop (nvidia, win7x64), and my opengl application (not fullscreen) doesnt seem to get past ~60FPS +-2. I know there can sometimes be problems in fullscreen apps with the refresh rate of the screen, but I thought those didnt apply in windowed apps. My current best guess it that it has something to do with the nvidia drivers, since my desktop is ATI, and it gets 1000+ FPS in windowed mode. Ive tried removing all the objects from the scene, and also adding lots of objects, and the FPS doesnt change till I add a lot of objects, which leads me to beleive its something outside of the app thats limiting the FPS.
I dont really care either way, but I need a way to get accurate timings for optimization. My current technique is just to get the time once a frame, subtract from the previous time, and use that to calculate FPS+MSPF. This, of course, includes glfwSwapBuffers(), which is taking about 10% of execution time according to the profiler. But, if I remove this from the timed section, I dont think Ill get good timing taking GPU rendering time into account, which I think I was getting before(unless Im misunderstanding the parallelism of the GPU?) Is there a way to get it unlimited, or a better way to measure timing?


Try changing the default v-sync setting in the driver configuration, or use the WGL_EXT_swap_control extension (Windows only) , for Linux you can use GLX_SGI_swap_control if the driver supports it.

Share this post


Link to post
Share on other sites
Application controlled vsync doesn't work under OpenGL with (at least some) NVIDIA drivers; the only way to set it is through the control panel.

Share this post


Link to post
Share on other sites
Wierd. It was set to letting the application choose, but the application was somehow turning on vsync, despite me using the same settings to start glfw on both computers. Changing it to Force Off fixed it. I guess nvidia/ati or something else changes the default state for a window

Share this post


Link to post
Share on other sites

but the application was somehow turning on vsync, despite me using the same settings to start glfw on both computers.


What somehow?
You can control v-sync yourself.
http://www.opengl.org/wiki/Platform_specifics:_Windows#SwapInterval_aka_vsync

Share this post


Link to post
Share on other sites
I know about that, but at the time I didnt have code to explicitelly enable or disable it. It seems my laptop defaulted to it being enabled when in a new context, and my desktop defaulted to it being disabled. Once I added the code (using what you linked to), it was controllable just fine

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!