FCT
载入中...
搜索中...
未找到
DepthStencilState.h
浏览该文件的文档.
1//
2// Created by Administrator on 2025/3/23.
3//
4
6#include "./Sampler.h"
7#ifndef DEPTHSTENCILSTATE_H
8#define DEPTHSTENCILSTATE_H
9
10namespace FCT {
21
31
33 public:
34 virtual ~DepthStencilState() override = default;
35
36 virtual void create() = 0;
37
38 bool depthTestEnable() const { return m_depthTestEnable; }
39 void depthTestEnable(bool enable) { m_depthTestEnable = enable; }
40
41 bool depthWriteEnable() const { return m_depthWriteEnable; }
42 void depthWriteEnable(bool enable) { m_depthWriteEnable = enable; }
43
46
48 void depthBoundsTestEnable(bool enable) { m_depthBoundsTestEnable = enable; }
49
50 bool stencilTestEnable() const { return m_stencilTestEnable; }
51 void stencilTestEnable(bool enable) { m_stencilTestEnable = enable; }
52
53 const StencilOpState& front() const { return m_front; }
54 void front(const StencilOpState& state) { m_front = state; }
55
56 const StencilOpState& back() const { return m_back; }
57 void back(const StencilOpState& state) { m_back = state; }
58
59 float minDepthBounds() const { return m_minDepthBounds; }
60 void minDepthBounds(float value) { m_minDepthBounds = value; }
61
62 float maxDepthBounds() const { return m_maxDepthBounds; }
63 void maxDepthBounds(float value) { m_maxDepthBounds = value; }
64
66
67 protected:
68 bool m_depthTestEnable = true;
69 bool m_depthWriteEnable = true;
72 bool m_stencilTestEnable = false;
75 float m_minDepthBounds = 0.0f;
76 float m_maxDepthBounds = 1.0f;
77 };
78}
79
80#endif //DEPTHSTENCILSTATE_H
PipelineResourceType getType() const override
virtual void create()=0
void front(const StencilOpState &state)
const StencilOpState & front() const
void depthCompareOp(CompareOp op)
const StencilOpState & back() const
void depthBoundsTestEnable(bool enable)
void stencilTestEnable(bool enable)
void back(const StencilOpState &state)
virtual ~DepthStencilState() override=default