IDXGISwapChain2::SetMaximumFrameLatency method

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 3 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

   
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