[Starting with Direct3D 11.1, we recommend not to use Present anymore to present a rendered image. Instead, use IDXGISwapChain1::Present1. For more info, see Remarks.]
Presents a rendered image to the user.
An integer that specifies how to synchronize presentation of a frame with the vertical blank.
- 0 - The presentation occurs immediately, there is no synchronization.
- 1 through 4 - Synchronize presentation after the nth vertical blank.
For the flip model (DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL), values are:
- 0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued.
- 1 through 4 - Synchronize presentation for at least n vertical blanks.
For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.
If the update region straddles more than one output (each represented by IDXGIOutput), Present performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.
An integer value that contains swap-chain presentation options. These options are defined by the DXGI_PRESENT constants.
Starting with Direct3D 11.1, we recommend to instead use IDXGISwapChain1::Present1 because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.
For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.
Because calling Present might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.
Differences between Direct3D 9 and Direct3D 10:
For flip presentation model swap chains that you create with the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the DXGI_PRESENT_DO_NOT_SEQUENCE flag in the Flags parameter.
For info about how data values change when you present content to the screen, see Converting data for the color space.
Suppose the following frames with sync-interval values are queued from oldest (A) to newest (E) before you call Present.
A: 3, B: 0, C: 0, D: 1, E: 0
When you call Present, the runtime shows frame A for only 1 vertical blank interval. The runtime terminates frame A early because of the sync interval 0 in frame B. Then the runtime shows frame D for 1 vertical blank interval, and then frame E until you submit a new presentation. The runtime discards frames B and C.