Vwait command?

BlitzMax Forums/BlitzMax Programming/Vwait command?

Grey Alien(Posted 2006) [#1]
In BlitzPlus there was a command called VWait that waited for Vertical refresh. I can't find the same in BlitzMax, but maybe someone knows how to check this in DirectX or wouldn't it be reliable as some cards never report when Vwait is happening. The Blitz Plus docs say


Note that this command is different to the vertical blank waiting mechanism in Flip because Flip will cause the graphics card (as opposed to the CPU) to wait for the next vertical blank. The vertical blank can be disabled on some graphics cards, hence it is quite common to use "VWait : Flip False" to ensure consistent updates on all setups.


Note that I don't want to use a Vwait: Flip False equivalent, I know that Max tries to do this anyway with certain Flip settings, I just want a Vwait equivalent.

However, to add futher complication I want to check for VWait *before* calling Graphics (i.e. VWait on the Desktop) in an effort make the Graphics w,h,0 window created as close to the VSync as possible to reduce vertical tearing in windowed mode. Of course if graphics takes too long to to make a window, this code will be useless, but it's worth a shot.


Eric(Posted 2006) [#2]
oops