Expand Minimize

ClearDepthStencilView routine

The ClearDepthStencilView function clears the specified currently bound depth-stencil view.

Syntax


PFND3D10DDI_CLEARDEPTHSTENCILVIEW ClearDepthStencilView;

VOID APIENTRY ClearDepthStencilView(
  _In_  D3D10DDI_HDEVICE hDevice,
  _In_  D3D10DDI_HDEPTHSTENCILVIEW hDepthStencilView,
  _In_  UINT Flags,
  _In_  FLOAT Depth,
  _In_  UINT8 Stencil
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

hDepthStencilView [in]

A handle to the depth-stencil view to clear.

Flags [in]

A value that specifies which parts of the buffer to affect. This parameter must be set to one of the following values from the D3D10_DDI_CLEAR_FLAG enumeration.

ValueMeaning

D3D10_DDI_CLEAR_DEPTH (0x01L)

The depth value (Z) is clamped to the ZNear and ZFar range of the viewport that is currently bound to slot zero by using Microsoft Direct3D. Afterwards, Z is clamped again to the representable range of the currently bound depth-stencil view by again using Direct3D.

D3D10_DDI_CLEAR_STENCIL (0x02L)

The stencil value is cleared.

 

Depth [in]

A single-precision float vector to set the depth to.

Stencil [in]

An unsigned 8-bit integer value to set the stencil to.

Return value

None

The driver can use the pfnSetErrorCb callback function to set an error code. For more information about setting error codes, see the following Remarks section.

Remarks

Floating point rules apply to the ClearDepthStencilView function.

The driver should not encounter any error, except for D3DDDIERR_DEVICEREMOVED. Therefore, if the driver passes any error, except for D3DDDIERR_DEVICEREMOVED, in a call to the pfnSetErrorCb function, the Direct3D runtime will determine that the error is critical. Even if the device was removed, the driver is not required to return D3DDDIERR_DEVICEREMOVED; however, if device removal interfered with the operation of ClearDepthStencilView (which typically should not happen), the driver can return D3DDDIERR_DEVICEREMOVED.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3d10umddi.h (include D3d10umddi.h)

See also

D3D10DDI_DEVICEFUNCS
pfnSetErrorCb

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft