docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -2,15 +2,34 @@
```cpp
void Clear(float r, float g, float b, float a);
void Clear(float r, float g, float b, float a, float depth, uint8_t stencil);
```
清除渲染目标视图。
清除渲染目标视图的颜色缓冲区和可选的深度/模板缓冲区
**参数**
**重载 1 参数(仅清除颜色)**
- `r` - 红色分量0.0f - 1.0f
- `g` - 绿色分量0.0f - 1.0f
- `b` - 蓝色分量0.0f - 1.0f
- `a` - Alpha 分量0.0f - 1.0f
**重载 2 参数(清除颜色、深度和模板):**
- `r` - 红色分量
- `g` - 绿色分量
- `b` - 蓝色分量
- `a` - Alpha 分量
- `depth` - 深度值(通常 0.0f 或 1.0f
- `stencil` - 模板值0-255
**示例:**
```cpp
// 仅清除颜色缓冲
rtv.Clear(0.1f, 0.1f, 0.1f, 1.0f);
// 清除颜色、深度和模板缓冲
rtv.Clear(0.1f, 0.1f, 0.1f, 1.0f, 1.0f, 0);
```
## 相关文档