docs: Fix RHI module documentation discrepancies

Fixed incorrect links in RHI documentation:
- Fixed OpenGL swap-chain docs with wrong references to threading/containers
- Fixed OpenGL texture docs with incorrect buffer/ texture links
- Fixed OpenGL vertex-array docs with wrong threading links
- Fixed OpenGL sampler docs with wrong threading links
- Fixed OpenGL device docs with incorrect swap-chain links
- Fixed fence docs with incorrect command-queue links
- Fixed command-list docs with missing shutdown link
- Fixed get-framebuffer-size.md title mismatch

Added missing documentation:
- Created fence/wait.md
- Created command-list/shutdown.md
- Created swap-chain/resize.md
- Created OpenGL sampler initialize.md, bind.md, unbind.md
This commit is contained in:
2026-03-19 01:07:49 +08:00
parent 452ccd4f8f
commit 2141534995
14 changed files with 156 additions and 21 deletions

View File

@@ -81,7 +81,7 @@
| 方法 | 文档 |
|------|------|
| `Shutdown` | [详细文档](methods.md) |
| `Shutdown` | [详细文档](../../threading/task-system/shutdown.md) |
## 使用示例

View File

@@ -0,0 +1,13 @@
# RHICommandList::Shutdown
```cpp
virtual void Shutdown() = 0;
```
关闭命令列表,释放所有相关资源。
**复杂度:** O(n) - 取决于管理的命令数量
## 相关文档
- [RHICommandList 总览](command-list.md) - 返回类总览

View File

@@ -18,9 +18,9 @@
| 方法 | 文档 |
|------|------|
| `Signal` | [详细文档](../command-queue/signal.md) |
| `Wait` | [详细文档](methods.md) |
| `GetCompletedValue` | [详细文档](../command-queue/get-completed-value.md) |
| `Signal` | [详细文档](signal.md) |
| `Wait` | [详细文档](../../threading/task-group/wait.md) |
| `GetCompletedValue` | [详细文档](get-completed-value.md) |
| `IsSignaled` | [详细文档](is-signaled.md) |
### 其他

View File

@@ -0,0 +1,20 @@
# RHIFence::Wait
```cpp
virtual void Wait(uint64_t value) = 0;
```
等待栅栏达到指定值。
**参数:**
- `value` - 要等待的值
**示例:**
```cpp
fence->Wait(1);
```
## 相关文档
- [RHIFence 总览](fence.md) - 返回类总览

View File

@@ -29,7 +29,7 @@
| `GetCapabilities` | [详细文档](../../device/get-capabilities.md) |
| `GetDeviceInfo` | [详细文档](../../device/get-device-info.md) |
| `GetNativeDevice` | [详细文档](../../device/get-native-device.md) |
| `GetNativeHandle` | [详细文档](../../swap-chain/get-native-handle.md) |
| `GetNativeHandle` | [详细文档](get-window.md) |
## 相关文档

View File

@@ -0,0 +1,22 @@
# OpenGLSampler::Bind
```cpp
void Bind(unsigned int unit);
```
绑定采样器到纹理单元。
**参数:**
- `unit` - 纹理单元编号
**复杂度:** O(1)
**示例:**
```cpp
sampler.Bind(0);
```
## 相关文档
- [OpenGLSampler 总览](sampler.md) - 返回类总览

View File

@@ -0,0 +1,29 @@
# OpenGLSampler::Initialize
```cpp
bool Initialize(const OpenGLSamplerDesc& desc);
```
初始化采样器。
**参数:**
- `desc` - 采样器描述符
**返回:** 成功返回 `true`,失败返回 `false`
**复杂度:** O(1)
**示例:**
```cpp
OpenGLSamplerDesc desc;
desc.minFilter = SamplerFilter::LinearMipmapLinear;
desc.magFilter = SamplerFilter::Linear;
desc.wrapS = SamplerWrapMode::Repeat;
desc.wrapT = SamplerWrapMode::Repeat;
sampler.Initialize(desc);
```
## 相关文档
- [OpenGLSampler 总览](sampler.md) - 返回类总览

View File

@@ -8,10 +8,10 @@
| 方法 | 文档 |
|------|------|
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
| `Initialize` | [详细文档](initialize.md) |
| `Shutdown` | [详细文档](../../sampler/shutdown.md) |
| `Bind` | [详细文档](../../shader/bind.md) |
| `Unbind` | [详细文档](../../shader/unbind.md) |
| `Bind` | [详细文档](bind.md) |
| `Unbind` | [详细文档](unbind.md) |
| `GetID` | [详细文档](get-id.md) |
| `GetNativeHandle` | [详细文档](../../sampler/get-native-handle.md) |

View File

@@ -0,0 +1,22 @@
# OpenGLSampler::Unbind
```cpp
void Unbind(unsigned int unit);
```
解绑采样器。
**参数:**
- `unit` - 纹理单元编号
**复杂度:** O(1)
**示例:**
```cpp
sampler.Unbind(0);
```
## 相关文档
- [OpenGLSampler 总览](sampler.md) - 返回类总览

View File

@@ -1,4 +1,4 @@
# OpenGLSwapChain::GetFramebufferSize
# OpenGLSwapChain::SetFramebufferSize
```cpp
void SetFramebufferSize(int width, int height);

View File

@@ -8,12 +8,12 @@
| 方法 | 文档 |
|------|------|
| `Initialize` (vsync) | [详细文档](../../../threading/task-system/initialize.md) |
| `Initialize` (vsync) | [详细文档](initialize.md) |
| `Initialize` (mode) | [详细文档](initialize-mode.md) |
| `Shutdown` | [详细文档](../../swap-chain/shutdown.md) |
| `Present` | [详细文档](present.md) |
| `SwapBuffers` | [详细文档](swap-buffers.md) |
| `Resize` | [详细文档](../../../containers/array/resize.md) |
| `Resize` | [详细文档](../../swap-chain/swap-chain.md) |
| `SetVSync` | [详细文档](set-vsync.md) |
| `IsVSync` | [详细文档](is-vsync.md) |
| `SetFullscreen` | [详细文档](set-fullscreen.md) |
@@ -23,7 +23,7 @@
| `PollEvents` | [详细文档](poll-events.md) |
| `GetCurrentBackBufferIndex` | [详细文档](../../swap-chain/get-current-back-buffer-index.md) |
| `GetCurrentBackBuffer` | [详细文档](../../swap-chain/get-current-back-buffer.md) |
| `GetWidth` / `GetHeight` | [详细文档](../../buffer/get-size.md) |
| `GetWidth` / `GetHeight` | [详细文档](get-size.md) |
| `GetFramebufferWidth` / `GetFramebufferHeight` | [详细文档](get-framebuffer-size.md) |
| `GetWindow` | [详细文档](get-window.md) |
| `GetNativeHandle` | [详细文档](../../swap-chain/get-native-handle.md) |

View File

@@ -8,12 +8,12 @@
| 方法 | 文档 |
|------|------|
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
| `Initialize` | [详细文档](initialize-2d.md) |
| `Initialize2D` | [详细文档](initialize-2d.md) |
| `InitializeCubeMap` | [详细文档](initialize-cube-map.md) |
| `LoadFromFile` | [详细文档](load-from-file.md) |
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
| `Bind` | [详细文档](../../shader/bind.md) |
| `Shutdown` | [详细文档](../../texture/shutdown.md) |
| `Bind` | [详细文档](bind-image.md) |
| `Unbind` | [详细文档](../../shader/unbind.md) |
| `BindImage` | [详细文档](bind-image.md) |
| `GenerateMipmap` | [详细文档](generate-mipmap.md) |
@@ -26,10 +26,12 @@
| `GetDepth` | [详细文档](../../texture/get-depth.md) |
| `GetMipLevels` | [详细文档](../../texture/get-mip-levels.md) |
| `GetTextureType` | [详细文档](../../texture/get-texture-type.md) |
| `GetNativeHandle` | [详细文档](../../buffer/get-native-handle.md) |
| `GetState` / `SetState` | [详细文档](../../buffer/get-state.md) |
| `GetName` / `SetName` | [详细文档](../../buffer/get-name.md) |
| `GetFormat` / `SetFormat` | [详细文档](../../texture/get-format.md) |
| `GetNativeHandle` | [详细文档](../../texture/get-native-handle.md) |
| `GetState` | [详细文档](../../texture/get-state.md) |
| `SetState` | [详细文档](../../texture/set-state.md) |
| `GetName` | [详细文档](../../texture/get-name.md) |
| `SetName` | [详细文档](../../texture/set-name.md) |
| `GetFormat` | [详细文档](../../texture/get-format.md) |
## 相关文档

View File

@@ -8,10 +8,10 @@
| 方法 | 文档 |
|------|------|
| `Initialize` | [详细文档](../../../threading/task-system/initialize.md) |
| `Initialize` | [详细文档](add-vertex-buffer.md) |
| `AddVertexBuffer` | [详细文档](add-vertex-buffer.md) |
| `SetIndexBuffer` | [详细文档](set-index-buffer.md) |
| `Shutdown` | [详细文档](../../../threading/task-system/shutdown.md) |
| `Shutdown` | [详细文档](get-id.md) |
| `Bind` | [详细文档](../../shader/bind.md) |
| `Unbind` | [详细文档](../../shader/unbind.md) |
| `GetID` | [详细文档](get-id.md) |

View File

@@ -0,0 +1,27 @@
# RHISwapChain::Resize
```cpp
virtual void Resize(uint32_t width, uint32_t height) = 0;
```
调整交换链大小。
**参数:**
- `width` - 新的宽度
- `height` - 新的高度
**复杂度:** O(n) - 取决于缓冲区数量
**注意:**
- 调整大小会导致所有后台缓冲区重建
- 应在渲染循环外调用
**示例:**
```cpp
swapChain->Resize(1920, 1080);
```
## 相关文档
- [RHISwapChain 总览](swap-chain.md) - 返回类总览