SFML community forums

Bindings - other languages => DotNet => Topic started by: Kwang1imsa on July 05, 2011, 04:02:27 am

Title: UseVerticalSync
Post by: Kwang1imsa on July 05, 2011, 04:02:27 am
I have been wondering, what exactly does useverticalsync do?

Does it simply effect the frequency of SFML's Display() function or does it insert a sleep() do delay the entire while loop that contains the draw function?
Title: UseVerticalSync
Post by: JAssange on July 05, 2011, 04:24:53 am
It adds delays so that it won't draw faster than your screen can display. Without vertical sync you'll sometimes see tearing with multiple frames visible at once.
Title: UseVerticalSync
Post by: Kwang1imsa on July 05, 2011, 05:49:22 am
No, I know what VerticalSync is.

I mean, does it sleep the thread for any extra time between one draw time or another in the application's main while loop or what?
Title: UseVerticalSync
Post by: Laurent on July 05, 2011, 07:42:16 am
It sleeps inside Display() until the monitor is ready to display a new frame.