IDirect3DMobileDevice::CreateDepthStencilSurface

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

This method creates a depth-stencil resource.

Syntax

HRESULT CreateDepthStencilSurface(
  UINT Width,
  UINT Height,
  D3DMFORMAT Format,
  D3DMMULTISAMPLE_TYPE MultiSample,
  IDirect3DMobileSurface** ppSurface
);

Parameters

  • Width
    [in] Width of the depth-stencil surface, in pixels.
  • Height
    [in] Height of the depth-stencil surface, in pixels.
  • Format
    [in] Member of the D3DMFORMAT enumerated type, describing the format of the depth-stencil surface. This value must be one of the enumerated depth-stencil formats for this device.
  • MultiSample
    [in] Member of the D3DMMULTISAMPLE_TYPE enumerated type, describing the multisampling buffer type. This value must be one of the allowed multisample types. When this surface is passed to IDirect3DMobileDevice::SetRenderTarget, its multisample type must be the same as that of the render target.
  • ppSurface
    [out] Address of a pointer to an IDirect3DMobileSurface interface that represents the created depth-stencil surface resource.

Return Value

If the method succeeds, the return value is D3DM_OK (see D3DM Values).

If the method fails, the return value can be E_OUTOFMEMORY, or one of the following D3DMERR Values.

  • D3DMERR_MEMORYPOOLEMPTY
  • D3DMERR_INVALIDCAL

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

See Also

Reference

IDirect3DMobileDevice
D3DMFORMAT
D3DMMULTISAMPLE_TYPE
IDirect3DMobileDevice::SetRenderTarget
IDirect3DMobileSurface