Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This method is used to determine if a given depth buffering format is supported with a particular combination of front and back buffer formats.

Syntax

HRESULT CheckDepthStencilMatch(
  UINT 
Adapter,
  D3DMDEVTYPE 
DeviceType,
  D3DMFORMAT 
AdapterFormat,
  D3DMFORMAT 
RenderTargetFormat,
  D3DMFORMAT 
DepthStencilFormat
);

Parameters

Adapter

[in] A value that indicates which device to provide information for. For possible values, see D3DMADAPTER Values.

DeviceType

[in] A D3DMDEVTYPEenumeration value that specifies the type of device.

AdapterFormat

[in] A legacy parameter provided for compatibility with older versions of Direct3D on Windows-based desktop systems. You must set this parameter to the D3DMFORMATenumeration value for the current format of the display adapter.

RenderTargetFormat

[in] A D3DMFORMATenumeration value that specifies the pixel format for the render target to test the device for.

DepthStencilFormat

[in] A D3DMFORMATenumeration value that specifies the pixel format for the depth buffer to test the device for.

Return Value

This method returns D3DM_OK if the format is supported and D3DMERR_NOTAVAILABLE if it is not supported.

In addition, this method may also return D3DMERR_INVALIDCALL if it fails. For more information, see D3DMERR Values.

Remarks

Currently, Direct3D Mobile specifies that any depth buffer that is supported on a device must be supported with all supported back buffer formats.

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