D3D10_DEPTH_STENCIL_DESC structure (d3d10.h)
Describes depth-stencil state.
Syntax
typedef struct D3D10_DEPTH_STENCIL_DESC {
BOOL DepthEnable;
D3D10_DEPTH_WRITE_MASK DepthWriteMask;
D3D10_COMPARISON_FUNC DepthFunc;
BOOL StencilEnable;
UINT8 StencilReadMask;
UINT8 StencilWriteMask;
D3D10_DEPTH_STENCILOP_DESC FrontFace;
D3D10_DEPTH_STENCILOP_DESC BackFace;
} D3D10_DEPTH_STENCIL_DESC;
Members
DepthEnable
Type: BOOL
A Boolean value that enables depth testing. The default value is TRUE.
DepthWriteMask
Type: D3D10_DEPTH_WRITE_MASK
A member of the D3D10_DEPTH_WRITE_MASK enumerated type that identifies a portion of the depth-stencil buffer that can be modified by depth data. The default value is D3D10_DEPTH_WRITE_MASK_ALL.
DepthFunc
Type: D3D10_COMPARISON_FUNC
A member of the D3D10_COMPARISON_FUNC enumerated type that defines how depth data is compared against existing depth data. The default value is D3D10_COMPARISON_LESS
StencilEnable
Type: BOOL
A Boolean value that enables stencil testing. The default value is FALSE.
StencilReadMask
Type: UINT8
A value that identifies a portion of the depth-stencil buffer for reading stencil data. The default value is D3D10_DEFAULT_STENCIL_READ_MASK.
StencilWriteMask
Type: UINT8
A value that identifies a portion of the depth-stencil buffer for writing stencil data. The default value is D3D10_DEFAULT_STENCIL_WRITE_MASK.
FrontFace
Type: D3D10_DEPTH_STENCILOP_DESC
A D3D10_DEPTH_STENCILOP_DESC structure that identifies how to use the results of the depth test and the stencil test for pixels whose surface normal is facing toward the camera.
BackFace
Type: D3D10_DEPTH_STENCILOP_DESC
A D3D10_DEPTH_STENCILOP_DESC structure that identifies how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera.
Remarks
Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.
The formats that support stenciling are DXGI_FORMAT_D24_UNORM_S8_UINT and DXGI_FORMAT_D32_FLOAT_S8X24_UINT.
Requirements
Requirement | Value |
---|---|
Header | d3d10.h |