This method is used to make a rendered scene visible to the user by causing the data from the back buffer to appear on the front buffer. For more information, see Scene Presentation.
HRESULT Present( CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride, CONST RGNDATA* pDirtyRegion );
[in] Pointer to a value that must be NULL unless the swap chain was created with D3DMSWAPEFFECT_COPY or D3DMSWAPEFFECT_COPY_VSYNC. pSourceRectis a pointer to a RECT structure containing the source rectangle. If NULL, the entire source surface is presented. If the rectangle exceeds the source surface, the rectangle is clipped to the source surface.
[in] Pointer to a value that must be NULL unless the swap chain was created with D3DMSWAPEFFECT_COPY or D3DMSWAPEFFECT_COPY_VSYNC. PDestRect is a pointer to a RECT structure containing the destination rectangle, in window client coordinates. If NULL, the entire client area is filled. If the rectangle exceeds the destination client area, the rectangle is clipped to the destination client area.
[in] This parameter is not used and should be set to NULL.
This method writes a presentation token into the command buffer, and then causes the command buffer to be flushed.
Unlike the IDirect3DDevice::Present method in Direct3D for Windows-based desktop systems, Direct3D Mobile's implementation of IDirect3DMobileDevice::Present does not include support for the hDestWindowOverride parameter.
If a call to IDirect3DDevice::Present fails because it received invalid parameters, the remaining tokens in the command buffer are held for further processing. If a call to IDirect3DDevice::Present fails for any other reason, then the entire contents of the command buffer are discarded.
If necessary, a stretch operation is applied to transfer the pixels within the source rectangle to the destination rectangle in the client area of the target window.