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

23 lines
406 B
Markdown
Raw Normal View History

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