Files
XCEngine/docs/api/rhi/opengl/depth-stencil-view/clear-depth-stencil.md

24 lines
473 B
Markdown
Raw Normal View History

# OpenGLDepthStencilView::ClearDepthStencil
```cpp
void ClearDepthStencil(float depth, uint8_t stencil)
```
2026-03-20 02:35:45 +08:00
同时清除深度和模板缓冲区。此操作会先绑定帧缓冲,然后执行清除。
**参数:**
- `depth` - 深度值(通常为 0.0 到 1.0
- `stencil` - 模板值0-255
2026-03-20 02:35:45 +08:00
**返回值:** `void`
**示例:**
```cpp
dsv.ClearDepthStencil(1.0f, 0);
```
## 相关文档
- [OpenGLDepthStencilView](depth-stencil-view.md) - 返回类总览