Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
# OpenGLDepthStencilView::Initialize
|
|
|
|
|
|
|
2026-03-20 02:35:45 +08:00
|
|
|
|
初始化深度模板视图。
|
|
|
|
|
|
|
|
|
|
|
|
## 重载 1
|
|
|
|
|
|
|
Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
```cpp
|
2026-03-20 02:35:45 +08:00
|
|
|
|
bool Initialize(unsigned int texture, const OpenGLDepthStencilViewDesc& desc);
|
Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
```
|
|
|
|
|
|
|
2026-03-20 02:35:45 +08:00
|
|
|
|
使用描述结构体初始化深度模板视图,将指定的 OpenGL 纹理创建为深度模板帧缓冲对象。
|
|
|
|
|
|
|
|
|
|
|
|
**参数:**
|
|
|
|
|
|
- `texture` - OpenGL 纹理 ID
|
|
|
|
|
|
- `desc` - 深度模板视图描述结构体
|
|
|
|
|
|
|
|
|
|
|
|
**返回:** 成功返回 `true`,失败返回 `false`。失败时帧缓冲不会被创建。
|
|
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
|
OpenGLDepthStencilView dsv;
|
|
|
|
|
|
OpenGLDepthStencilViewDesc desc;
|
|
|
|
|
|
desc.type = DepthStencilType::Texture2D;
|
|
|
|
|
|
desc.mipLevel = 0;
|
|
|
|
|
|
desc.baseArraySlice = 0;
|
|
|
|
|
|
desc.arraySize = 1;
|
|
|
|
|
|
dsv.Initialize(textureID, desc);
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## 重载 2
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
|
bool Initialize(unsigned int texture, int mipLevel = 0);
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
使用简单参数初始化深度模板视图。
|
Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
|
|
|
|
|
|
**参数:**
|
|
|
|
|
|
- `texture` - OpenGL 纹理 ID
|
2026-03-20 02:35:45 +08:00
|
|
|
|
- `mipLevel` - mipmap 级别(默认为 0)
|
Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
|
2026-03-20 02:35:45 +08:00
|
|
|
|
**返回:** 成功返回 true,失败返回 false
|
|
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
|
// 使用描述结构体初始化
|
|
|
|
|
|
OpenGLDepthStencilViewDesc desc;
|
|
|
|
|
|
desc.type = DepthStencilType::Texture2D;
|
|
|
|
|
|
desc.mipLevel = 0;
|
|
|
|
|
|
desc.baseArraySlice = 0;
|
|
|
|
|
|
desc.arraySize = 1;
|
|
|
|
|
|
dsv.Initialize(textureID, desc);
|
|
|
|
|
|
|
|
|
|
|
|
// 使用简单参数初始化
|
|
|
|
|
|
dsv.Initialize(textureID, 0);
|
|
|
|
|
|
```
|
Fix RHI documentation discrepancies and add missing doc files
Fixed incorrect links in OpenGL documentation:
- Fixed wrong links to threading/task-system docs for Initialize/Shutdown methods
- Fixed wrong links to buffer docs for GetNativeHandle methods
- Fixed wrong links to shader docs for Bind/Unbind methods
- Fixed wrong links to command-list docs for Clear/Reset/Close methods
- Fixed wrong links to buffer/get-size.md for width/height methods
Added missing documentation files:
- OpenGL buffer: bind.md, unbind.md, get-type.md, initialize.md
- OpenGL fence: initialize.md, reset.md
- OpenGL swap-chain: get-size.md, initialize.md
- OpenGL render-target-view: initialize.md, shutdown.md, bind.md, unbind.md, clear.md, get-size.md
- OpenGL depth-stencil-view: initialize.md, shutdown.md, bind.md, unbind.md, get-size.md
- OpenGL command-list: clear.md
All links validated with fix_links.py - no broken references.
2026-03-19 00:54:54 +08:00
|
|
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
|
|
|
|
|
|
- [OpenGLDepthStencilView 总览](depth-stencil-view.md) - 返回类总览
|