QRhiDriverInfo Struct

Describes the physical device, adapter, or graphics API implementation that is used by an initialized QRhi . 更多...

头: #include <QRhiDriverInfo>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::Gui)
qmake: QT += gui
Since: Qt 6.6

公共类型

enum DeviceType { UnknownDevice, IntegratedDevice, DiscreteDevice, ExternalDevice, VirtualDevice, CpuDevice }

公共变量

quint64 deviceId
QByteArray deviceName
QRhiDriverInfo::DeviceType deviceType
quint64 vendorId

详细描述

Graphics APIs offer different levels and kinds of information. The only value that is available across all APIs is the deviceName , which is a freetext description of the physical device, adapter, or is a combination of the strings reported for GL_VENDOR + GL_RENDERER + GL_VERSION deviceId is always 0 for OpenGL. vendorId is always 0 for OpenGL and Metal. deviceType is always UnknownDevice for OpenGL and Direct 3D.

注意: This is a RHI API with limited compatibility guarantees, see QRhi 了解细节。

成员类型文档编制

enum QRhiDriverInfo:: DeviceType

Specifies the graphics device's type, when the information is available.

In practice this is only applicable with Vulkan and Metal. With Direct 3D 11 and 12, using an adapter with the software flag set leads to the value CpuDevice . Otherwise, and with OpenGL, the value is always 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 ().