IDirect3DDevice9Ex::SetMaximumFrameLatency
IDirect3DDevice9Ex::SetMaximumFrameLatency
Set the number of frames that the system is allowed to queue for rendering.
HRESULT SetMaximumFrameLatency( UINT pMaxLatency );
Parameters
- pMaxLatency
[in] The maximum number of back buffer frames that a driver can queue. The value is typically 3, but can range from 1 to 255. A value of 1 will reset latency to the default.
Return Values
If the method succeeds, the return value is D3D_OK.
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.
Three frames are commonly used in a render loop - one frame for the back buffer, one frame that is currently being rendered, and one frame getting ready to render. However, there are scenarios when more latency may be desired. One example could be when video playback is supported. In this scenario, the CPU is required to playback video, and the render loop can be told to queue up more frames in the queue, while playback occurs.
See Also
IDirect3DDevice9Ex InterfaceIDirect3DDevice9Ex::GetMaximumFrameLatency Method