Jump to content
  • Advertisement
Sign in to follow this  

OpenGL Irregular high framerates due to SwapBuffer taking no time

This topic is 2810 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

Hi all,

I'm having trouble nailing down a problem with frame rate variations and can't quite wrap my head around it.

(Using OpenGL 2.0 on GeForce GTX260)

I'm obvserving the following behaviour:

Without user interaction, my rendertime falls from average 24 ms to 2 ms about every 41th frame. This is due to SwapBuffer needing zero time in these frames and is repeatable across application runs. This happens also with VerticalSync off.

With movement of the viewer (and resulting different load on the gpu) the problem gets a lot worse.

I'm familiar with OpenGL working asynchronously and that measurements of OpenGL-calls and SwapBuffer calls aren't quite reliable. However, the regularity is too striking to be random noise.

The problem is fixed with a glFinish-call before SwapBuffers, but limits the desired parallelism of gpu and cpu.

So,is anybody experiencing similiar phenomena and if so, how do you counteract it? Can anybody offer an explanation of why it happens?

Thanks for any input,


Share this post

Link to post
Share on other sites
I think this could happen to my Direct3D application, too. I also get those spikes in my FPS, so it could be that it isn't a problem just with OpenGL.

But one more thing: Did you try fullscreen mode? In my case all those spikes were gone then! [smile]

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!