not-fl3/macroquad

How to turn off vsync?

YuichiKamishiro opened this issue · 2 comments

My fps cant go above 60.

#360

Unfortunately this is not possible :(

On web browser will send animationFrame as fast as it feels doing so - depending on other tabs activity and so on.
On PC vsync usually depends on the driver settings.

Just for someone who will come here from google :)

Macroquad do not limit fps, it is not doing anything with fps at all. Some platforms (browsers in particular) gives us no control over fps, some - give siomecontrol over vsync, but it can be overriten by the user in the driver settings (windows), with env variable(linux) and, I guess, performance/battery saving settings (android/ios).

swap_interval : Some(0) in Conf might be a solution, but it does not guarantee a disbled vsync, it really is super platform specific and there are varios way user can enable/disable vsync.
https://docs.rs/miniquad/latest/miniquad/conf/struct.Platform.html#structfield.swap_interval