ID3D11DeviceContext::ClearDepthStencilView Method

Clears the depth-stencil resource.

Syntax

public:
void ClearDepthStencilView(
         ID3D11DepthStencilView *pDepthStencilView,
         UINT ClearFlags,
         FLOAT Depth,
         UINT8 Stencil
)  

Parameters

pDepthStencilView
Type: ID3D11DepthStencilView *

[in] Pointer to the depth stencil to be cleared.

ClearFlags
Type: UINT 

[in] Identify the type of data to clear (see D3D11_CLEAR_FLAG).

Depth
Type: FLOAT 

[in] Clear the depth buffer with this value. This value will be clamped between 0 and 1.

Stencil
Type: UINT8 

[in] Clear the stencil buffer with this value.

Return value

None.

Remarks

The full extent of the resource view is always cleared. Viewport and scissor settings are not applied.

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