ttsenis
asked on
Info on VSYNC
Hi,
in a window state game i can not use flip under DIRECTX. Instead i can use overlay flip. I do not want to use overalys because they are tricky. Instead i made a complex chain and the pointer off Primary surf is being scrolled over this complex surf. The main problem is that i can not detect the VSYNC so the animation does not have a normal-continous rate. Any ideas on detecting VSYNC.
in a window state game i can not use flip under DIRECTX. Instead i can use overlay flip. I do not want to use overalys because they are tricky. Instead i made a complex chain and the pointer off Primary surf is being scrolled over this complex surf. The main problem is that i can not detect the VSYNC so the animation does not have a normal-continous rate. Any ideas on detecting VSYNC.
I've checked it and found out that DirectDraw provides the functionality you need. IDirectDraw2::GetVerticalB lankStatus ( lpbIsInVB ) and IDirectDraw2::GetScanLine( lpdwScanLine ). Note that the latter can return ERR_NOT_SUPPORTED so you need a solution that can work without it if it's not available on a specific target machine.
.f
.f
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I think that i will use GetTickCount syncronized through GetVerticalBlankStatus in order to get the maximum time for few calculations.
A side note: Unless you are targetting for a win nt system prior to 5.0 you shouldn't be using direct draw anymore. DX8 has introduced DirectX Graphics which is basically the old Direct3D interface.
.f