ID3D11DeviceContext::OMSetDepthStencilState Method

Sets the depth-stencil state of the output-merger stage.

Syntax

public:
void OMSetDepthStencilState(
         ID3D11DepthStencilState *pDepthStencilState,
         UINT StencilRef
)  

Parameters

pDepthStencilState
Type: ID3D11DepthStencilState *

[in, optional] Pointer to a depth-stencil state interface (see ID3D11DepthStencilState) to bind to the device. Set this to NULL to use the default state listed in D3D11_DEPTH_STENCIL_DESC.

StencilRef
Type: UINT 

[in] Reference value to perform against when doing a depth-stencil test. See remarks.

Return value

None.

Remarks

To create a depth-stencil state interface, call ID3D11Device::CreateDepthStencilState.

The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10.

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

ID3D11DeviceContext

ID3D11DeviceContext Members