docs: update RHI API docs

This commit is contained in:
2026-03-20 02:35:45 +08:00
parent ea756c0177
commit 070b444f8f
501 changed files with 13493 additions and 2022 deletions

View File

@@ -2,18 +2,49 @@
**命名空间**: `XCEngine::RHI`
**描述**: DirectX 12 命令分配器的 D3D12 实现。
**类型**: `class` (standalone, does not inherit from base)
**描述**: DirectX 12 命令分配器的 D3D12 实现,用于管理 GPU 命令分配内存。
## 构造函数
| 方法 | 描述 |
|------|------|
| [`D3D12CommandAllocator`](constructor.md) | 默认构造函数 |
## 公共方法
| 方法 | 描述 |
|------|------|
| [`Initialize`](../../../threading/task-system/initialize.md) | 初始化命令分配器 |
| [`Shutdown`](../../../threading/task-system/shutdown.md) | 关闭命令分配器 |
| [`Reset`](../../command-list/reset.md) | 重置命令分配器 |
| [`Initialize`](initialize.md) | 初始化命令分配器 |
| [`Shutdown`](shutdown.md) | 关闭命令分配器 |
| [`Reset`](reset.md) | 重置命令分配器 |
| [`IsReady`](is-ready.md) | 检查是否就绪 |
| [`GetCommandAllocator`](get-command-allocator.md) | 获取 D3D12 命令分配器 |
## 析构函数
| 方法 | 描述 |
|------|------|
| [`~D3D12CommandAllocator`](destructor.md) | 析构函数,自动调用 Shutdown |
## 使用示例
```cpp
#include <XCEngine/RHI/D3D12/D3D12CommandAllocator.h>
using namespace XCEngine::RHI;
D3D12CommandAllocator allocator;
if (allocator.Initialize(device, CommandQueueType::Direct)) {
allocator.Reset();
if (allocator.IsReady()) {
ID3D12CommandAllocator* native = allocator.GetCommandAllocator();
}
allocator.Shutdown();
}
```
## 相关文档
- [D3D12 后端总览](../../opengl/overview.md)
- [D3D12 后端总览](../../d3d12/d3d12.md)