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

Author Topic: Vertical Sync  (Read 2856 times)

0 Members and 2 Guests are viewing this topic.

Lox

  • Newbie
  • *
  • Posts: 14
    • View Profile
Vertical Sync
« on: July 20, 2011, 11:47:49 pm »
My application is running through a while loop that looks something like this:

Code: [Select]
while(true)
{
calculateAndDisplayFPS();
MainDraw();
}


Within MainDraw, I call RenderWindow.Display().  I heard that when I enable visual sync, the Display() should sleep until SFML can draw again.  My FPS is calculated with an external-to-sfml timer and drawn with SFML.  However, my FPS does not lock to around-60 like I would expect it to, but often is way higher. Am I missing something?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Vertical Sync
« Reply #1 on: July 21, 2011, 12:42:16 am »
Maybe Vertical Sync is globally disabled on your computer. The software delivered with the graphics card/driver could let you customize that.

What if you measure FPS with SFML?
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development: