SFML community forums

General => Feature requests => Topic started by: Hronom on July 14, 2013, 06:58:45 pm

Title: Method for retrying of availability of vertical sync
Post by: Hronom on July 14, 2013, 06:58:45 pm
I wanna some method that return true if vertical sync available on current platform. So if it not available i set maximum frame rate option.
Title: Re: Method for retrying of availability of vertical sync
Post by: eXpl0it3r on July 14, 2013, 07:13:41 pm
Haven't heard of a system that wouldn't support VSync. The only thing that's could be a problem is, when the driver can block the changing of VSync state, but since this is very driver specific I would be very surprise if there was a general way to retrieve that information.

If you however meant to simply track the current VSync state, then I suggest to use your own boolean and check against it. :)
Title: Re: Method for retrying of availability of vertical sync
Post by: Hronom on July 22, 2013, 12:55:08 pm
Thanks for reply.

I have a situation, at home i have normal drivers with enabled vsync(NVIDIA), and then i enable vsync in SFML its works. Then i come to my friend its have integrated intel card and in its driver by default vsync disabled, so programs cant force using it.

I understand that this is driver specific. But it will be nice if i can retrive of availability of enabling feature like vsync. So if i cant enable i try emulate vsync.
Title: Re: Method for retrying of availability of vertical sync
Post by: eXpl0it3r on July 22, 2013, 01:10:38 pm
I'm not sure if that's possible to check.
What you could do is render a few frames and calculate the FPS, if it's too high activate your own framerate lowering code (or setFramerateLimit).
Title: Re: Method for retrying of availability of vertical sync
Post by: netrick on July 23, 2013, 09:08:14 am
Just put an option menu in your game when user can set if he wants vsync of frame limit (with vsync default).
Title: Re: Method for retrying of availability of vertical sync
Post by: Hronom on July 23, 2013, 09:52:04 am
Just put an option menu in your game when user can set if he wants vsync of frame limit (with vsync default).
Its not good, becouse, then user launch a game he see glitches in the main menu and user dont know why this glitches happens. So game must resolve some problems automaticly...
Title: Re: Method for retrying of availability of vertical sync
Post by: netrick on July 24, 2013, 11:37:15 am
Then set frame limit as default option.
Title: Re: Method for retrying of availability of vertical sync
Post by: AlexAUT on July 24, 2013, 01:13:28 pm
Solution already posted...

What you could do is render a few frames and calculate the FPS, if it's too high activate your own framerate lowering code (or setFramerateLimit).



AlexAUT