gboisse / gfx

A minimalist and easy to use graphics API.
MIT License
498 stars 35 forks source link

Use DXGI_PRESENT_ALLOW_TEARING when not using vsync. #91

Closed maoliver-amd closed 11 months ago

maoliver-amd commented 11 months ago

DXGI_PRESENT_ALLOW_TEARING flag is required to support variable refresh rate monitors. It is also useful as it smooths out frame times when not using vsync (looks like a pulse wave otherwise).

https://learn.microsoft.com/en-us/windows/win32/direct3ddxgi/variable-refresh-rate-displays https://learn.microsoft.com/en-us/windows/win32/api/dxgi/ne-dxgi-dxgi_swap_chain_flag