docs: update RHI API docs
This commit is contained in:
@@ -4,10 +4,18 @@
|
||||
virtual void SetDepthStencilState(const DepthStencilState& state) = 0;
|
||||
```
|
||||
|
||||
设置深度模板状态。
|
||||
设置深度测试和模板测试的状态配置。控制像素是否根据深度值和模板值被丢弃。
|
||||
|
||||
**参数:**
|
||||
- `state` - 深度模板状态结构体
|
||||
- `state` - 深度模板状态结构体(包含 depthEnable、depthWriteMask、depthFunc、stencilEnable 等)
|
||||
|
||||
**返回:** `void`
|
||||
|
||||
**异常:** 无
|
||||
|
||||
**线程安全:** ❌
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
@@ -16,9 +24,12 @@ DepthStencilState dsState;
|
||||
dsState.depthEnable = true;
|
||||
dsState.depthWriteMask = true;
|
||||
dsState.depthFunc = ComparisonFunc::Less;
|
||||
dsState.stencilEnable = false;
|
||||
cmdList->SetDepthStencilState(dsState);
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHICommandList 总览](command-list.md) - 返回类总览
|
||||
- [SetStencilRef](set-stencil-ref.md) - 设置模板参考值
|
||||
- [SetPipelineState](set-pipeline-state.md) - 设置管线状态
|
||||
Reference in New Issue
Block a user