views:

45

answers:

2

I'm working on a apps that's based on DirectX10 by using SlimDX. I would like to enable vsync similar to DirectX9, but the fps doesn't seems to lock to 60Hz(which happens if I'm using Direct9). I'm setting vsync by using this

SwapChain.Present(1, PresentFlags.None);

Did I do something wrong?

Btw, I'm running Win7 with ATI HD5570 video card. After some googling, I gather that ATI can force vsync on certain games. So I wonder if that's related.

Reference for code to C++ will do as well. I'll translate it myself.

Thanks

A: 

First argument of SwapChain.Present is syncInterval. 0 indicates that presentation should occur immediately, without synchronization. Any other value indicates that presentation should be synchonized with the specified next vertical blank. So use it like this:

SwapChain.Present(0, PresentFlags.None);
Blackfighter
Supposingly it should work as published, but it doesn't on my machine with ATI 5570HD. I've read some post point to problem of ATI with certain driver version, but I'm not sure if mine is affected.
faulty
Have you tried running pix to verify actual value of presentation interval and swap chain desc or other structures?http://msdn.microsoft.com/en-us/library/ee417062%28VS.85%29.aspx
Blackfighter
A: 

You can try to force vsync using catalyst control center

http://img51.imageshack.us/img51/4636/vsync.png

can't insert images directly (low rep)

Blackfighter
Ive' done that too. Still doesn't lock. It's either fluctuating higher than 60, or fluctuating between 50 to 60.
faulty