SFML community forums

Help => General => Topic started by: Johannes01 on December 28, 2017, 02:04:37 am

Title: FPS capped around 47 to 50
Post by: Johannes01 on December 28, 2017, 02:04:37 am
My FPS seem to be capped around 47 to 50 frames. It doesn't really matter how much there is to update. I have tried to run a program where the only thing that happens is that I am calculating the FPS. Still around 50 frames. I tried to tripple the amount of stuff my program does. Also around 50 frames. I understand why my program only recieves part of the processing power, even if more would be available. But why such an odd number? And how do I change it? I would much prefere around 60 FPS or more. Is this even a problem with SFML?

Here's how I calculate the FPS, maybe the problem lies there.

        lastTime = 0;

        while (window.isOpen())
        {
                currentTime = clock.restart().asSeconds();
                fps = 1 / currentTime;
                lastTime = currentTime;

                //do stuff...
        }

Thanks.
Title: Re: FPS capped around 47 to 50
Post by: eXpl0it3r on December 28, 2017, 09:20:57 am
You most likely have vsync enabled in your GPU settings and you may have a 50Hz monitor.
Title: Re: FPS capped around 47 to 50
Post by: Johannes01 on December 28, 2017, 12:33:04 pm
It really was vsync. Thanks a lot!