Page 1 of 1
[SOLVED] PresentationInterval settings
Posted: Tue Apr 07, 2009 3:59 pm
by bishopnator
Hi, it would be nice to have support for setting different values to PresentationInterval during initialization of DX. In some scenes in my application I have problem with fps which is sometimes below 60. I have 60Hz refresh rate on my LCD and when fps decreases below 60 it is very visible on camera movement - I see some ticks in movement .. movement is not smooth. So I tried to set different value - D3DPRESENT_INTERVAL_TWO - so my fps was one half of refresh rate of monitor and every movement was really smooth because every scene im my application runs above 30fps, so I get stable fps with this settings.
Re: PresentationInterval settings
Posted: Sun Apr 12, 2009 4:35 pm
by sinbad
Ok, this is the knid of thing we'd normally expose via the named params, but it's a little more complicated since the driver is not guaranteed to support this option, so it would need checking. The equivalent on GL is asking for _wglSwapIntervalEXT(2) (not sure about the GLX / OSX version).
Re: PresentationInterval settings
Posted: Sun Apr 12, 2009 5:53 pm
by sinbad
This is supported now as the "vsyncInterval" setting, defaults to 1. I found that D3D9 would just crash if you tried to use anything other than 1 in windowed mode though, regardless of what the device caps said, so it's only respected in full screen mode. In GL it works in both windowed and fullscreen modes.
Re: PresentationInterval settings
Posted: Mon Apr 13, 2009 1:31 pm
by bishopnator
great news

thanks a lot.