I am trying to find a solid method for being able to set exactly how many FPS I want my OpenGL application to render on screen. I can do it to some extent by sleeping for 1000/fps milliseconds but that doesn't take into account the time needed to render.
Which is the most consistent way to limit fps to desired amount?
Controlling FPS limit in OpenGL application
3dframe-rateopengl
Best Answer
you can sync to vblank by using wglSwapIntervalEXT in opengl. its not nice code, but it does work.
http://www.gamedev.net/topic/360862-wglswapintervalext/#entry3371062
and