Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am trying to completely unlimit the SFML framerate, so that as many frames will be displayed as possible. The reason for this is I want to loop through one section of code which calculates positions of objects in a physics simulation, and update the screen after perhaps 100 iterations.

I have done:

window.SetFramerateLimit(0);
window.UseVerticalSync(false);

The SFML documentation says this should set the frame rate to "infinity", but I still think it's stuck at about 60-ish...

Does anyone know how I can get more performance out of this?

Also once unlimited, I need to be able to do the equivalent of this in SFML, from SDL:

SDL.Delay(1000);

Is there a way of doing this? The SDL Delay is good because it frees CPU time for other processes. Any help would be greatly appreciated, especially as it's Christmas and you probably have better things to do! (I don't I'm a student.)

share|improve this question
1  
Crosspost from SO: stackoverflow.com/questions/14032593/… –  Alayric Dec 25 '12 at 20:34
    
Without any code about vertical sync, the frame rate of a SFML application should not be limited. I tried that and got something around 1500 fps. –  danijar Dec 25 '12 at 22:01
add comment

1 Answer 1

Those values you set are set to that by default you shouldn't have to explicitly write that. Anyway why you are stuck at 60 is probably because your driver still has vertical sync enabled. The driver can choose to override any application, you should be able to change this in the drivers control panel.

And equivalent to SDL.Delay(1000) in SFML would be: sf::sleep(sf::seconds(1)) if you are using SFML 2.0-RC or sf::Sleep(1) if you are using the obsolete 1.6

share|improve this answer
    
Okay thanks, I will look into it! –  user3728501 Dec 27 '12 at 14:13
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.