22 lines
557 B
Markdown
22 lines
557 B
Markdown
|
|
# D3D12CommandList::Clear
|
|||
|
|
|
|||
|
|
```cpp
|
|||
|
|
void Clear(float r, float g, float b, float a, uint32_t buffers) override;
|
|||
|
|
```
|
|||
|
|
|
|||
|
|
清除渲染目标和/或深度模板缓冲区。
|
|||
|
|
|
|||
|
|
**参数:**
|
|||
|
|
- `r` - 清除颜色(红色通道)
|
|||
|
|
- `g` - 清除颜色(绿色通道)
|
|||
|
|
- `b` - 清除颜色(蓝色通道)
|
|||
|
|
- `a` - 清除颜色(Alpha通道)
|
|||
|
|
- `buffers` - 要清除的缓冲区标志
|
|||
|
|
|
|||
|
|
**复杂度:** O(1)
|
|||
|
|
|
|||
|
|
## 相关文档
|
|||
|
|
|
|||
|
|
- [D3D12CommandList 总览](command-list.md) - 返回类总览
|
|||
|
|
- [RHICommandList::Clear](../../command-list/command-list.md) - 基类方法
|