IDirect3DMobileDevice::Present
A version of this page is also available for
4/8/2010
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.
Syntax
HRESULT Present(
CONST RECT* pSourceRect,
CONST RECT* pDestRect,
HWND hDestWindowOverride,
CONST RGNDATA* pDirtyRegion
);
Parameters
- pSourceRect
[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.
- pDestRect
[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.
- hDestWindowOverride
Not supported.
- pDirtyRegion
[in] This parameter is not used and should be set to NULL.
Return Value
If the method succeeds, the return value is D3DM_OK (see D3DM Values).
If the method fails, the return value can be one of the following D3DMERR Values.
- D3DMERR_INVALIDCALL
- D3DMERR_DEVICELOST
Remarks
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.
Requirements
Header | d3dm.h |
Library | D3dm.lib, D3dmguid.lib |
Windows Embedded CE | Windows CE 5.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |