QRhiDriverInfo Struct
描述了已初始化的QRhi 所使用的物理设备、适配器或图形API实现。更多内容...
| 标题: | #include <rhi/qrhi.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
| qmake: | QT += gui-private |
| 自: | Qt 6.6 |
公共类型
| enum | DeviceType { UnknownDevice, IntegratedDevice, DiscreteDevice, ExternalDevice, VirtualDevice, CpuDevice } |
公共变量
| quint64 | deviceId |
| QByteArray | deviceName |
| QRhiDriverInfo::DeviceType | deviceType |
| quint64 | vendorId |
详细说明
图形 API 提供不同级别和类型的信息。 唯一在所有 API 中都可用的值是deviceName ,它是物理设备、适配器的自由文本描述,或者是由GL_VENDOR 、GL_RENDERER 和GL_VERSION 所报告的字符串组合而成。对于 OpenGL,deviceId 始终为 0。对于 OpenGL 和 Metal,vendorId 始终为 0。对于 OpenGL 和 Direct 3D,deviceType 始终为UnknownDevice 。
注意:这是一个 RHI API,兼容性保证有限,详情请参阅QRhi 。
成员类型文档
enum QRhiDriverInfo::DeviceType
指定图形设备的类型(如果该信息可用)。
实际上,这仅适用于 Vulkan 和 Metal。在 Direct 3D 11 和 12 中,若使用的适配器设置了软件标志,则该值为 `CpuDevice`。否则,以及在 OpenGL 中,该值始终为 `UnknownDevice`。
| 常量 | 值 |
|---|---|
QRhiDriverInfo::UnknownDevice | 0 |
QRhiDriverInfo::IntegratedDevice | 1 |
QRhiDriverInfo::DiscreteDevice | 2 |
QRhiDriverInfo::ExternalDevice | 3 |
QRhiDriverInfo::VirtualDevice | 4 |
QRhiDriverInfo::CpuDevice | 5 |
成员变量文档
quint64 QRhiDriverInfo::deviceId
另请参阅 QRhi::driverInfo()。
QByteArray QRhiDriverInfo::deviceName
另请参阅 QRhi::driverInfo()。
QRhiDriverInfo::DeviceType QRhiDriverInfo::deviceType
另请参阅 QRhi::driverInfo() 和QRhiDriverInfo::DeviceType 。
quint64 QRhiDriverInfo::vendorId
另请参阅 QRhi::driverInfo()。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.