if (mDisplay.VSync == false)
{
mSwap.PresentParameters.PresentationInterval = PresentInterval.Immediate;
mSwap.Present();
}
else
{
mSwap.PresentParameters.PresentationInterval = PresentInterval.One;
mSwap.Present();
}
[MDX] Turning VSync on/off without recreating swap chain?
Is there any way to turn VSync on and off without recreating the device or SwapChain? I tried this (after BeginScene/EndScene block):
And it seems that calling Present does not look at the SwapChain.PresentParameters structure. I can turn VSync on or off by creating the SwapChain with the Immediate or One flags, but I want to be able to change it without recreating the SwapChain. Any ideas?
The PresentParameters property you're using is probably ignored and only available as readonly information. IIRC the proper way to do this is to call device.Reset with the updated parameters (and recreate various resources as usual). This may also implicitly recreate the swap chain though.
Hope this helps :)
Hope this helps :)
You'll need to reset your device in order to specify new presentation parameters.
Even then it is worth baring in mind that presentation parameter is often overuled by the device driver - look at your driver control panel and you'll probably see a "always off", "always on" and "application preference" configuration.
hth
Jack
Even then it is worth baring in mind that presentation parameter is often overuled by the device driver - look at your driver control panel and you'll probably see a "always off", "always on" and "application preference" configuration.
hth
Jack
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement