Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: UseVerticalSync  (Read 3669 times)

0 Members and 1 Guest are viewing this topic.

Kwang1imsa

  • Newbie
  • *
  • Posts: 26
    • MSN Messenger - kwang1imsa@gmail.com
    • View Profile
UseVerticalSync
« 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?

JAssange

  • Full Member
  • ***
  • Posts: 104
    • View Profile
UseVerticalSync
« Reply #1 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.

Kwang1imsa

  • Newbie
  • *
  • Posts: 26
    • MSN Messenger - kwang1imsa@gmail.com
    • View Profile
UseVerticalSync
« Reply #2 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
UseVerticalSync
« Reply #3 on: July 05, 2011, 07:42:16 am »
It sleeps inside Display() until the monitor is ready to display a new frame.
Laurent Gomila - SFML developer

 

anything