IDirect3DDevice9Ex::WaitForVBlank method (d3d9.h)

Suspend execution of the calling thread until the next vertical blank signal.

Syntax

HRESULT WaitForVBlank(
  [in] UINT iSwapChain
);

Parameters

[in] iSwapChain

Type: UINT

Swap chain index. This is an optional, zero-based index used to specify a swap chain on a multihead card.

Return value

Type: HRESULT

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.

Requirements

Requirement Value
Target Platform Windows
Header d3d9.h
Library D3D9.lib

See also

IDirect3DDevice9Ex