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

26 lines
570 B
Markdown
Raw Normal View History

# OpenGLDepthStencilView::InitializeCubemap
```cpp
bool InitializeCubemap(unsigned int cubemap, int face, int mipLevel = 0)
```
初始化立方体贴图的深度模板视图。
**参数:**
- `cubemap` - 立方体贴图对象 ID
- `face` - 立方体贴面索引0-5
- `mipLevel` - mipmap 级别(默认为 0
**返回:** `bool` - 成功返回 true失败返回 false
**示例:**
```cpp
OpenGLDepthStencilView dsv;
dsv.InitializeCubemap(cubemapTexture, 0, 0);
```
## 相关文档
- [OpenGLDepthStencilView](depth-stencil-view.md) - 返回类总览