ID3D11Device::CreateDepthStencilState Method

Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.

Syntax

public:
HRESULT CreateDepthStencilState(
         const D3D11_DEPTH_STENCIL_DESC *pDepthStencilDesc,
         ID3D11DepthStencilState **ppDepthStencilState
)  

Parameters

pDepthStencilDesc
Type: D3D11_DEPTH_STENCIL_DESC *

[in] Pointer to a depth-stencil state description (see D3D11_DEPTH_STENCIL_DESC).

ppDepthStencilState
Type: ID3D11DepthStencilState **

[out, optional] Address of a pointer to the depth-stencil state object created (see ID3D11DepthStencilState).

Return value

Type: HRESULT 

This method returns one of the following Direct3D 11 return codes.

Remarks

4096 unique depth-stencil state objects can be created on a device at a time.

Requirements

Header: Declared in d3d11_x.h (d3d11.h on other Windows platforms).

Library: Use d3d11_x.lib (d3d11.lib on other Windows platforms).

See also

ID3D11Device

ID3D11Device Members