IDXGISwapChain2::GetFrameLatencyWaitableObject method (dxgi1_3.h)

Returns a waitable handle that signals when the DXGI adapter has finished presenting a new frame.

Windows 8.1 introduces new APIs that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the DXGI swap chain with the DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT flag set, then call GetFrameLatencyWaitableObject to retrieve the waitable handle. Use the waitable handle with WaitForSingleObjectEx to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample. When you are done with the handle, use CloseHandle to close it.


HANDLE GetFrameLatencyWaitableObject();

Return value

A handle to the waitable object, or NULL if the swap chain was not created with DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT.


When an application is finished using the object handle returned by IDXGISwapChain2::GetFrameLatencyWaitableObject, use the CloseHandle function to close the handle.


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