Windows Dev Center

IDXGISwapChain2::GetMaximumFrameLatency method

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

Syntax


HRESULT GetMaximumFrameLatency(
  [out] UINT *pMaxLatency
);

Parameters

pMaxLatency [out]

The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default, but should be set to 2 if the scene takes longer than it takes for one vertical refresh (typically about 16ms) to draw.

Return value

Returns S_OK if successful; otherwise, returns one of the following members of the D3DERR enumerated type:

  • D3DERR_DEVICELOST
  • D3DERR_DEVICEREMOVED
  • D3DERR_DRIVERINTERNALERROR
  • D3DERR_INVALIDCALL
  • D3DERR_OUTOFVIDEOMEMORY

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

Dxgi1_3.h

Library

Dxgi.lib

See also

DirectX latency sample
IDXGISwapChain2
SetMaximumFrameLatency

 

 

Community Additions

ADD
Show:
© 2015 Microsoft