docs: update RHI API docs
This commit is contained in:
@@ -9,7 +9,7 @@ virtual RHISwapChain* CreateSwapChain(const SwapChainDesc& desc) = 0;
|
||||
**参数:**
|
||||
- `desc` - 交换链描述符,包含尺寸、缓冲数量、格式等
|
||||
|
||||
**返回:** 新创建的交换链指针,失败返回 `nullptr`
|
||||
**返回:** 新创建的交换链指针,失败返回 `nullptr`,OpenGL 后端始终返回有效对象
|
||||
|
||||
**复杂度:** O(1)
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
**类型**: `class` (abstract)
|
||||
|
||||
**头文件**: `XCEngine/RHI/RHIDevice.h`
|
||||
|
||||
**描述**: RHI 渲染设备抽象接口,代表一个图形设备实例。
|
||||
|
||||
## 概述
|
||||
@@ -51,7 +53,7 @@ if (device->Initialize(desc)) {
|
||||
}
|
||||
|
||||
const RHI::RHIDeviceInfo& info = device->GetDeviceInfo();
|
||||
printf("GPU: %ls\n", info.description.c_str());
|
||||
printf("GPU: %ls\n", info.renderer.c_str());
|
||||
|
||||
// 创建资源
|
||||
RHI::BufferDesc bufferDesc;
|
||||
|
||||
@@ -15,7 +15,7 @@ virtual const RHIDeviceInfo& GetDeviceInfo() const = 0;
|
||||
```cpp
|
||||
const RHIDeviceInfo& info = device->GetDeviceInfo();
|
||||
|
||||
printf("GPU: %ls\n", info.description.c_str());
|
||||
printf("GPU: %ls\n", info.renderer.c_str());
|
||||
printf("Vendor: %ls\n", info.vendor.c_str());
|
||||
printf("Driver: %ls\n", info.version.c_str());
|
||||
printf("VRAM: %llu MB\n", info.dedicatedVideoMemory / 1024 / 1024);
|
||||
|
||||
Reference in New Issue
Block a user