# 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) - 返回类总览