SFML community forums
Help => Graphics => Topic started by: Predator106 on June 28, 2008, 06:48:35 pm
-
Hi, I'm completely new to SFML, and was wondering if it is native and possible to cap the frame rate. I read somewhere in the forums about somebody mentioning a function for it, but I found no such function in the documentation.
-
hi,
if you mean limiting the framerate, then SetFramerateLimit is what you are looking for.
when creating a (Rendered)Window, you can set it's framerate, what looks like this:
sf::RenderedWindow App(sf::VideoMode(X-Res, Y-Res, Bit), "Title");
App.SetFramerateLimit(Rate);
where "Rate" is your wished limit for Frames.
See also the Tutorials Page: http://www.sfml-dev.org/tutorials/1.3/window-time.php[/code]
-
Yep, Thanks, that's exactly what I wanted.