Reputation: 387
I found swap chain created with flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL or DXGI_SWAP_EFFECT_FLIP_DISCARD) was locked to VSync (1/60 sec), calling IDXGISwapChain1::Present1 method with SyncInterval set to 0 as follows doesn't work.
swap_chain->Present1(0, 0, ¶m);
Does anyone know how to disable VSync for DXGI flip model?
Upvotes: 3
Views: 1238
Reputation: 21
I know this was a long time ago, but I found a solution that worked for me.
When calling Present()
on the swap chain, you should pass DXGI_PRESENT_ALLOW_TEARING
as a flag (second parameter).
For that to work, the swap chain requires the DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING
flag to be set.
According to Microsoft's documentation, it's used for variable refresh rate displays. I guess that makes sense (I am still very much a newbie when it comes to graphics programming).
Hope that helps!
Upvotes: 2
Reputation: 8824
What is your version of Windows 10? UWP and windowed swap chain used to always be locked to VSync, prior to the 1511 build.
Upvotes: 3