IDXGISwapChain2::SetMaximumFrameLatency method (dxgi1_3.h)

Sets the number of frames that the swap chain is allowed to queue for rendering.

Syntax

HRESULT SetMaximumFrameLatency(
  UINT MaxLatency
);

Parameters

MaxLatency

The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default.

Return value

Returns S_OK if successful; otherwise, DXGI_ERROR_DEVICE_REMOVED if the device was removed.

Remarks

This method is only valid for use on swap chains created with DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT. Otherwise, the result will be DXGI_ERROR_INVALID_CALL.

Requirements

Requirement Value
Minimum supported client Windows 8.1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 R2 [desktop apps | UWP apps]
Target Platform Windows
Header dxgi1_3.h
Library Dxgi.lib

See also

DirectX latency sample

GetMaximumFrameLatency

IDXGISwapChain2