IDirect3DDevice9Ex::SetMaximumFrameLatency method (d3d9.h)

Set the number of frames that the system is allowed to queue for rendering.

Syntax

HRESULT SetMaximumFrameLatency(
  [in] UINT MaxLatency
);

Parameters

[in] MaxLatency

Type: UINT

The maximum number of back buffer frames that a driver can queue. The value is typically 3, but can range from 1 to 20. A value of 0 will reset latency to the default. For multi-head devices, MaxLatency is specified per-head.

Return value

Type: HRESULT

Possible return values include: D3D_OK or D3DERR_DEVICEREMOVED (see D3DERR).

Remarks

Frame latency is the number of frames that are allowed to be stored in a queue, before submission for rendering. Latency is often used to control how the CPU chooses between responding to user input and frames that are in the render queue.

It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.

Requirements

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

See also

IDirect3DDevice9Ex