Skip to content

Latest commit

 

History

History
129 lines (119 loc) · 4 KB

ns-d3d11-cd3d11_depth_stencil_desc.md

File metadata and controls

129 lines (119 loc) · 4 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:d3d11.CD3D11_DEPTH_STENCIL_DESC
CD3D11_DEPTH_STENCIL_DESC (d3d11.h)
Represents a depth-stencil-state structure and provides convenience methods for creating depth-stencil-state structures.
CD3D11_DEPTH_STENCIL_DESC
CD3D11_DEPTH_STENCIL_DESC structure [Direct3D 11]
d3d11/CD3D11_DEPTH_STENCIL_DESC
direct3d11.cd3d11_depth_stencil_desc
direct3d11\cd3d11_depth_stencil_desc.htm
direct3d11
511AF313-C692-423B-AD5A-A0A36018572B
12/05/2018
CD3D11_DEPTH_STENCIL_DESC, CD3D11_DEPTH_STENCIL_DESC structure [Direct3D 11], d3d11/CD3D11_DEPTH_STENCIL_DESC, direct3d11.cd3d11_depth_stencil_desc
d3d11.h
Windows
Windows 7 [desktop apps \| UWP apps]
Windows Server 2008 R2 [desktop apps \| UWP apps]
Windows
19H1
CD3D11_DEPTH_STENCIL_DESC
d3d11/CD3D11_DEPTH_STENCIL_DESC
c++
APIRef
kbSyntax
HeaderDef
D3D11.h
CD3D11_DEPTH_STENCIL_DESC

CD3D11_DEPTH_STENCIL_DESC structure

-description

Represents a depth-stencil-state structure and provides convenience methods for creating depth-stencil-state structures.

-struct-fields

-remarks

Here is how D3D11.h defines CD3D11_DEPTH_STENCIL_DESC:

struct CD3D11_DEPTH_STENCIL_DESC : public D3D11_DEPTH_STENCIL_DESC
{
    CD3D11_DEPTH_STENCIL_DESC()
    {}
    explicit CD3D11_DEPTH_STENCIL_DESC( const D3D11_DEPTH_STENCIL_DESC& o ) :
        D3D11_DEPTH_STENCIL_DESC( o )
    {}
    explicit CD3D11_DEPTH_STENCIL_DESC( CD3D11_DEFAULT )
    {
        DepthEnable = TRUE;
        DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
        DepthFunc = D3D11_COMPARISON_LESS;
        StencilEnable = FALSE;
        StencilReadMask = D3D11_DEFAULT_STENCIL_READ_MASK;
        StencilWriteMask = D3D11_DEFAULT_STENCIL_WRITE_MASK;
        const D3D11_DEPTH_STENCILOP_DESC defaultStencilOp =
        { D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_STENCIL_OP_KEEP, D3D11_COMPARISON_ALWAYS };
        FrontFace = defaultStencilOp;
        BackFace = defaultStencilOp;
    }
    explicit CD3D11_DEPTH_STENCIL_DESC(
        BOOL depthEnable,
        D3D11_DEPTH_WRITE_MASK depthWriteMask,
        D3D11_COMPARISON_FUNC depthFunc,
        BOOL stencilEnable,
        UINT8 stencilReadMask,
        UINT8 stencilWriteMask,
        D3D11_STENCIL_OP frontStencilFailOp,
        D3D11_STENCIL_OP frontStencilDepthFailOp,
        D3D11_STENCIL_OP frontStencilPassOp,
        D3D11_COMPARISON_FUNC frontStencilFunc,
        D3D11_STENCIL_OP backStencilFailOp,
        D3D11_STENCIL_OP backStencilDepthFailOp,
        D3D11_STENCIL_OP backStencilPassOp,
        D3D11_COMPARISON_FUNC backStencilFunc )
    {
        DepthEnable = depthEnable;
        DepthWriteMask = depthWriteMask;
        DepthFunc = depthFunc;
        StencilEnable = stencilEnable;
        StencilReadMask = stencilReadMask;
        StencilWriteMask = stencilWriteMask;
        FrontFace.StencilFailOp = frontStencilFailOp;
        FrontFace.StencilDepthFailOp = frontStencilDepthFailOp;
        FrontFace.StencilPassOp = frontStencilPassOp;
        FrontFace.StencilFunc = frontStencilFunc;
        BackFace.StencilFailOp = backStencilFailOp;
        BackFace.StencilDepthFailOp = backStencilDepthFailOp;
        BackFace.StencilPassOp = backStencilPassOp;
        BackFace.StencilFunc = backStencilFunc;
    }
    ~CD3D11_DEPTH_STENCIL_DESC() {}
    operator const D3D11_DEPTH_STENCIL_DESC&() const { return *this; }
};

-see-also

CD3D11 Helper Structures