fix: improve doc link navigation and tree display
- Fix link resolution with proper relative/absolute path handling - Improve link styling with underline decoration - Hide leaf nodes from tree, only show directories - Fix log file path for packaged app
This commit is contained in:
39
docs/api/rhi/device/initialize.md
Normal file
39
docs/api/rhi/device/initialize.md
Normal file
@@ -0,0 +1,39 @@
|
||||
# RHIDevice::Initialize
|
||||
|
||||
```cpp
|
||||
virtual bool Initialize(const RHIDeviceDesc& desc) = 0;
|
||||
```
|
||||
|
||||
初始化 RHI 设备,建立与图形适配器的连接。
|
||||
|
||||
**参数:**
|
||||
- `desc` - 设备描述符,包含窗口句柄、分辨率、调试选项等配置
|
||||
|
||||
**返回:** 成功返回 `true`,失败返回 `false`
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
**示例:**
|
||||
|
||||
```cpp
|
||||
RHIDeviceDesc desc;
|
||||
desc.windowHandle = hwnd;
|
||||
desc.width = 1920;
|
||||
desc.height = 1080;
|
||||
desc.appName = L"MyApp";
|
||||
desc.enableDebugLayer = true;
|
||||
desc.enableGPUValidation = true;
|
||||
|
||||
RHIDevice* device = RHIFactory::CreateRHIDevice(RHIType::D3D12);
|
||||
if (device->Initialize(desc)) {
|
||||
// 设备初始化成功
|
||||
} else {
|
||||
// 处理初始化失败
|
||||
delete device;
|
||||
}
|
||||
```
|
||||
|
||||
## 相关文档
|
||||
|
||||
- [RHIDevice 总览](device.md) - 返回类总览
|
||||
- [RHIDeviceDesc](../types/types.md) - 设备描述结构体
|
||||
Reference in New Issue
Block a user