Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IDirect3DMobileDevice::Present

Windows Mobile 6.5
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.


HRESULT Present(
  CONST RECT* pSourceRect,
  CONST RECT* pDestRect,
  HWND hDestWindowOverride,
  CONST RGNDATA* pDirtyRegion
);

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.

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

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.

Headerd3dm.h
LibraryD3dm.lib, D3dmguid.lib
Windows Embedded CEWindows CE 5.0 and later
Windows MobileWindows Mobile Version 5.0 and later

Community Additions

Show:
© 2015 Microsoft