docs: update RHI API docs
This commit is contained in:
43
docs/api/rhi/d3d12/fence/initialize.md
Normal file
43
docs/api/rhi/d3d12/fence/initialize.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# D3D12Fence::Initialize
|
||||
|
||||
## 函数签名
|
||||
|
||||
```cpp
|
||||
bool Initialize(ID3D12Device* device, uint64_t initialValue = 0)
|
||||
```
|
||||
|
||||
## 中文描述
|
||||
|
||||
创建 D3D12 栅栏对象并初始化同步事件。
|
||||
|
||||
## 参数
|
||||
|
||||
| 参数 | 类型 | 描述 |
|
||||
|------|------|------|
|
||||
| `device` | `ID3D12Device*` | D3D12 设备指针 |
|
||||
| `initialValue` | `uint64_t` | 栅栏初始值,默认为 0 |
|
||||
|
||||
## 返回值
|
||||
|
||||
`bool` - 初始化成功返回 `true`,失败返回 `false`
|
||||
|
||||
## 复杂度
|
||||
|
||||
O(1)
|
||||
|
||||
## 示例
|
||||
|
||||
```cpp
|
||||
ID3D12Device* device = /* 获取 D3D12 设备 */;
|
||||
D3D12Fence fence;
|
||||
if (!fence.Initialize(device, 0)) {
|
||||
// 初始化失败
|
||||
return false;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [D3D12Fence](fence.md) - 类总览
|
||||
- [D3D12Fence::Shutdown](shutdown.md) - 关闭栅栏
|
||||
- [D3D12Fence::Signal](signal.md) - 信号栅栏
|
||||
Reference in New Issue
Block a user