IDirect3DDevice9Ex::WaitForVBlank
IDirect3DDevice9Ex::WaitForVBlank
Suspend execution of the calling thread until the next vertical blank signal.
HRESULT WaitForVBlank( UINT SwapChainIndex );
Parameters
- SwapChainIndex
[in] Swap chain index. This is an optional, zero-based index used to specify a swap chain on a multihead card.
Return Values
This method will always return D3D_OK.
Remarks
This method allows applications to efficiently throttle their frame rate to that of the monitor associated with the device. Following a vertical blank, the amount of time it takes for the thread to wake up is typically very short.
In some scenarios the hardware may stop generating vertical blank signals when nothing is being displayed on the monitor. In this case, the method will wait approximately 100ms and return with D3D_OK.