17 D3D11_DEPTH_STENCIL_DESC desc;
18 desc.DepthEnable = (depthStencilState->
depthEnable ? TRUE : FALSE);
21 desc.StencilEnable = (depthStencilState->
stencilEnable ? TRUE : FALSE);
36 ID3D11DepthStencilState* state =
nullptr;
37 HRESULT hr = device->CreateDepthStencilState(&desc, &state);
46 return std::make_shared<DX11DepthStencilState>(
47 reinterpret_cast<ID3D11Device*
>(device),
48 static_cast<DepthStencilState const*>(
object));
64 D3D11_DEPTH_WRITE_MASK_ZERO,
65 D3D11_DEPTH_WRITE_MASK_ALL
70 D3D11_COMPARISON_NEVER,
71 D3D11_COMPARISON_LESS,
72 D3D11_COMPARISON_EQUAL,
73 D3D11_COMPARISON_LESS_EQUAL,
74 D3D11_COMPARISON_GREATER,
75 D3D11_COMPARISON_NOT_EQUAL,
76 D3D11_COMPARISON_GREATER_EQUAL,
77 D3D11_COMPARISON_ALWAYS
82 D3D11_STENCIL_OP_KEEP,
83 D3D11_STENCIL_OP_ZERO,
84 D3D11_STENCIL_OP_REPLACE,
85 D3D11_STENCIL_OP_INCR_SAT,
86 D3D11_STENCIL_OP_DECR_SAT,
87 D3D11_STENCIL_OP_INVERT,
88 D3D11_STENCIL_OP_INCR,
unsigned char stencilWriteMask
#define CHECK_HR_RETURN_NONE(msg)
static D3D11_DEPTH_WRITE_MASK const msWriteMask[]
GraphicsObjectType GetType() const
DepthStencilState * GetDepthStencilState()
static D3D11_COMPARISON_FUNC const msComparison[]
ID3D11DepthStencilState * GetDXDepthStencilState()
static std::shared_ptr< GEObject > Create(void *device, GraphicsObject const *object)
#define LogError(message)
ID3D11DeviceChild * mDXObject
static D3D11_STENCIL_OP const msOperation[]
DX11DepthStencilState(ID3D11Device *device, DepthStencilState const *depthStencilState)
unsigned char stencilReadMask
void Enable(ID3D11DeviceContext *context)