Files
XCEngine/docs/api/rhi/d3d12/command-allocator/constructor.md

21 lines
538 B
Markdown
Raw Normal View History

2026-03-20 02:35:45 +08:00
# D3D12CommandAllocator::D3D12CommandAllocator
```cpp
D3D12CommandAllocator();
```
默认构造函数,创建一个未初始化的命令分配器实例。创建后需要调用 [`Initialize`](initialize.md) 进行初始化。
## 示例
```cpp
D3D12CommandAllocator allocator;
// 此时 allocator 未初始化,需要调用 Initialize
allocator.Initialize(device);
```
## 相关文档
- [D3D12CommandAllocator 总览](command-allocator.md) - 返回类总览
- [D3D12CommandAllocator::Initialize](initialize.md) - 初始化分配器