SFML community forums

Help => Graphics => Topic started by: inaudax on September 13, 2014, 07:29:12 am

Title: Vsync limits entire loop to 60 cycles per second
Post by: inaudax on September 13, 2014, 07:29:12 am
My understanding of vsync in SFML is that it is only supposed to limit the calls to the display() function of sf::RenderWindow.  However, whenever I have vsync enabled the entire game loop gets limited to 60 cycles per second.  Has anyone else encountered this issue?
Title: Re: Vsync limits entire loop to 60 cycles per second
Post by: OniLinkPlus on September 13, 2014, 08:04:53 am
This is exactly how Vsync is supposed to work. If Vsync is enabled, every time you call display(), the program goes to sleep until the next vertical sync of your monitor.
Title: Re: Vsync limits entire loop to 60 cycles per second
Post by: Hapax on September 15, 2014, 10:48:10 pm
If you need to run your 'game loop' more rapidly than the display rate, you'll need to "decouple the simulation and rendering framerates", as described in this article about time steps (http://gafferongames.com/game-physics/fix-your-timestep/).