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
|
|
|
|
# OpenGLRenderTargetView::Bind
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
2026-03-20 02:35:45 +08:00
|
|
|
|
void Bind(unsigned int slot = 0);
|
|
|
|
|
|
void Bind(unsigned int count, const unsigned int* framebuffers, const int* drawBuffers);
|
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
|
|
|
|
绑定渲染目标视图作为当前渲染目标。
|
|
|
|
|
|
|
|
|
|
|
|
**重载 1 参数:**
|
|
|
|
|
|
- `slot` - 绑定槽位(预留参数,当前实现中未使用)
|
|
|
|
|
|
|
|
|
|
|
|
**重载 2 参数:**
|
|
|
|
|
|
- `count` - 帧缓冲区数量
|
|
|
|
|
|
- `framebuffers` - 帧缓冲区 ID 数组
|
|
|
|
|
|
- `drawBuffers` - 对应每个帧缓冲区的绘制缓冲附件
|
|
|
|
|
|
|
|
|
|
|
|
**行为说明:**
|
|
|
|
|
|
- 当 `count` 为 1 时,直接绑定单个帧缓冲区
|
|
|
|
|
|
- 当 `count` 大于 1 时,启用多重渲染目标(MRT),依次绑定各帧缓冲区并设置绘制缓冲附件
|
|
|
|
|
|
|
|
|
|
|
|
**示例:**
|
|
|
|
|
|
|
|
|
|
|
|
```cpp
|
|
|
|
|
|
// 单帧缓冲绑定
|
|
|
|
|
|
rtv.Bind();
|
|
|
|
|
|
|
|
|
|
|
|
// 多帧缓冲绑定
|
|
|
|
|
|
unsigned int fbos[] = { fbo1, fbo2 };
|
|
|
|
|
|
int attachments[] = { GL_COLOR_ATTACHMENT0, GL_COLOR_ATTACHMENT1 };
|
|
|
|
|
|
rtv.Bind(2, fbos, attachments);
|
|
|
|
|
|
```
|
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
|
|
|
|
|
|
|
|
|
|
## 相关文档
|
|
|
|
|
|
|
|
|
|
|
|
- [OpenGLRenderTargetView 总览](render-target-view.md) - 返回类总览
|