IDirect3DDevice8::CreateDepthStencilSurface

This method creates a depth-stencil resource.

HRESULT CreateDepthStencilSurface(
  UINT Width,
  UINT Height,
  D3DFORMAT Format,
  D3DMULTISAMPLE_TYPE MultiSample,
  IDirect3DSurface8** 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 D3DFORMAT 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 D3DMULTISAMPLE_TYPE enumerated type, describing the multisampling buffer type. This value must be one of the allowed multisample types. When this surface is passed to IDirect3DDevice8::SetRenderTarget, its multisample type must be the same as that of the render target.
  • ppSurface
    [out, retval] Address of a pointer to an IDirect3DSurface8 interface, representing the created depth-stencil surface resource.

Return Values

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be one of the following values:

Remarks

The memory class of the depth-stencil buffer is always D3DPOOL_DEFAULT.

Requirements

OS Versions: Windows CE .NET 4.0 and later.
Header: D3d8.h.
Link Library: D3d8.lib.

See Also

D3DFORMAT | D3DMULTISAMPLE_TYPE | IDirect3DSurface8 | IDirect3DDevice8::CopyRects | IDirect3DDevice8::SetRenderTarget | IDirect3DDevice8

 Last updated on Thursday, April 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.