共用方式為


CD3DX12_DEPTH_STENCIL_DESC結構

協助程序結構,可讓您輕鬆初始化 D3D12_DEPTH_STENCIL_DESC 結構。

語法

struct CD3DX12_DEPTH_STENCIL_DESC  : public D3D12_DEPTH_STENCIL_DESC{
   CD3DX12_DEPTH_STENCIL_DESC();
   explicit CD3DX12_DEPTH_STENCIL_DESC(const D3D12_DEPTH_STENCIL_DESC& o);
   explicit CD3DX12_DEPTH_STENCIL_DESC(CD3DX12_DEFAULT);
   explicit CD3DX12_DEPTH_STENCIL_DESC(BOOL depthEnable, D3D12_DEPTH_WRITE_MASK depthWriteMask, D3D12_COMPARISON_FUNC depthFunc, BOOL stencilEnable, UINT8 stencilReadMask, UINT8 stencilWriteMask, D3D12_STENCIL_OP frontStencilFailOp, D3D12_STENCIL_OP frontStencilDepthFailOp, D3D12_STENCIL_OP frontStencilPassOp, D3D12_COMPARISON_FUNC frontStencilFunc, D3D12_STENCIL_OP backStencilFailOp, D3D12_STENCIL_OP backStencilDepthFailOp, D3D12_STENCIL_OP backStencilPassOp, D3D12_COMPARISON_FUNC backStencilFunc);
   ~CD3DX12_DEPTH_STENCIL_DESC();
   operator const D3D12_DEPTH_STENCIL_DESC&() const;
};

成員

CD3DX12_DEPTH_STENCIL_DESC()

建立新的未初始化D3DX12_DEPTH_STENCIL_DESC實例。

explicit CD3DX12_DEPTH_STENCIL_DESC(const D3D12_DEPTH_STENCIL_DESC& o)

建立D3DX12_DEPTH_STENCIL_DESC的新實例,以另一個 D3D12_DEPTH_STENCIL_DESC 結構的內容初始化。

明確CD3DX12_DEPTH_STENCIL_DESC(CD3DX12_DEFAULT)

建立以預設參數初始化之D3DX12_DEPTH_STENCIL_DESC的新實例。

        DepthEnable = TRUE;  
        DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;  
        DepthFunc = D3D12_COMPARISON_FUNC_LESS;  
        StencilEnable = FALSE;  
        StencilReadMask = D3D12_DEFAULT_STENCIL_READ_MASK;  
        StencilWriteMask = D3D12_DEFAULT_STENCIL_WRITE_MASK;  
        const D3D12_DEPTH_STENCILOP_DESC defaultStencilOp =  
        { D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_STENCIL_OP_KEEP, D3D12_COMPARISON_FUNC_ALWAYS };  
        FrontFace = defaultStencilOp;  
        BackFace = defaultStencilOp;  

explicit CD3DX12_DEPTH_STENCIL_DESC(BOOL depthEnable, D3D12_DEPTH_WRITE_MASK depthWriteMask, D3D12_COMPARISON_FUNC depthFunc, BOOL 樣板Enable, UINT8 樣板ReadMask, UINT8 樣板WriteMask, D3D12_STENCIL_OP frontStencilFailOp、D3D12_STENCIL_OP frontStencilDepthFailOp、D3D12_STENCIL_OP frontStencilPassOp、D3D12_COMPARISON_FUNC frontStencilFunc、D3D12_STENCIL_OP backStencilFailOp、D3D12_STENCIL_OP backStencilDepthFailOp、D3D12_STENCIL_OP backStencilPassOp、D3D12_COMPARISON_FUNC backStencilFunc)

建立D3DX12_DEPTH_STENCIL_DESC的新實例,初始化下列參數:

BOOL depthEnable

D3D12_DEPTH_WRITE_MASK depthWriteMask

D3D12_COMPARISON_FUNC depthFunc

BOOL 樣板Enable

UINT8 樣板ReadMask

UINT8 樣板WriteMask

D3D12_STENCIL_OP frontStencilFailOp

D3D12_STENCIL_OP frontStencilDepthFailOp

D3D12_STENCIL_OP frontStencilPassOp

D3D12_COMPARISON_FUNC frontStencilFunc

D3D12_STENCIL_OP backStencilFailOp

D3D12_STENCIL_OP backStencilDepthFailOp

D3D12_STENCIL_OP backStencilPassOp

D3D12_COMPARISON_FUNC backStencilFunc

~CD3DX12_DEPTH_STENCIL_DESC()

終結CD3DX12_DEPTH_STENCIL_DESC的實例。

operator const D3D12_DEPTH_STENCIL_DESC&() const

定義父結構類型的 和 傳遞參考運算元。

需求

需求
頁首
D3dx12.h

另請參閱

D3D12_DEPTH_STENCIL_DESC

D3D12 的協助程序結構