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

@@ -0,0 +1,37 @@
# D3D12CommandAllocator::Initialize
```cpp
bool Initialize(ID3D12Device* device, CommandQueueType type = CommandQueueType::Direct);
```
初始化 D3D12 命令分配器,创建指定类型的命令分配器。
## 参数
| 参数 | 类型 | 描述 |
|------|------|------|
| `device` | `ID3D12Device*` | D3D12 设备指针 |
| `type` | `CommandQueueType` | 命令队列类型,默认值为 `Direct` |
## 返回值
`bool` - 初始化是否成功
## 示例
```cpp
D3D12CommandAllocator allocator;
if (allocator.Initialize(device, CommandQueueType::Direct)) {
// 分配器初始化成功
}
```
## 复杂度
O(1)
## 相关文档
- [D3D12CommandAllocator 总览](command-allocator.md) - 返回类总览
- [D3D12CommandAllocator::Reset](reset.md) - 重置分配器
- [D3D12CommandAllocator::Shutdown](shutdown.md) - 关闭分配器