LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: emzic on April 08, 2008, 14:45:15

Title: limiting framerate with the lwjgl-timer
Post by: emzic on April 08, 2008, 14:45:15
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!
Title: Re: limiting framerate with the lwjgl-timer
Post by: kappa on April 08, 2008, 17:01:51
just stick a "Display.sync(fpsYouWant);" in your applications main loop.