pygame-community / pygame-ce

🐍🎮 pygame - Community Edition is a FOSS Python library for multimedia applications (like games). Built on top of the excellent SDL library.
https://pyga.me
932 stars 154 forks source link

Proper VSync #1870

Open robertpfeiffer opened 1 year ago

robertpfeiffer commented 1 year ago
robertpfeiffer commented 1 year ago

Should toggle_fullscreen() change the display surface resolution? Should toggle_fullscreen change the display surface resolution with resizeable?

robertpfeiffer commented 1 year ago

I checked with MangoHUD. It works perfectly and as expected on XFCE+X11. No jitter, no tearing.

robertpfeiffer commented 1 year ago

Same on wayland. Just works.

robertpfeiffer commented 1 year ago

KMS/DRM also works. This is the only platform where vsync actually makes a difference for tearing. On Sway and X11, it doesn't tear, but it just renders extra frames at 90 FPS. On KMSDRM, it tears in two places at once at 90 FPS, and in one place at 30 FPS. My screen is set to 60 FPS.

robertpfeiffer commented 1 year ago

Adaptive vsync is not possible with Renderer

robertpfeiffer commented 1 year ago

@MyreMylar @Mega-JC Any thoughts on these?