Files
XCEngine/docs/api/rhi/device/get-device-info.md
2026-03-20 02:35:45 +08:00

615 B

RHIDevice::GetDeviceInfo

virtual const RHIDeviceInfo& GetDeviceInfo() const = 0;

获取当前设备的详细信息。

返回: 设备信息结构体引用

复杂度: O(1)

示例:

const RHIDeviceInfo& info = device->GetDeviceInfo();

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);

相关文档