limiting framerate with the lwjgl-timer

Started by emzic, April 08, 2008, 14:45:15

Previous topic - Next topic

emzic

hello,

i am trying to limit the framerate of my opengl-application to a given framerate (for example 30fps) in order to save CPU-time.

but i still want to keep this framerate as constant as much.

so is there a possiblilty to wait a certain time after a frame has been rendered, without doing a busy-wait?

thanks!

kappa

just stick a "Display.sync(fpsYouWant);" in your applications main loop.