In questa pagina

QRhiDriverInfo Struct

Descrive il dispositivo fisico, l'adattatore o l'implementazione dell'API grafica utilizzata da un oggetto ` QRhi` inizializzato. Altro...

Intestazione: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
A partire da: Qt 6.6

Tipi pubblici

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

Variabili pubbliche

quint64 deviceId
QByteArray deviceName
QRhiDriverInfo::DeviceType deviceType
quint64 vendorId

Descrizione dettagliata

Le API grafiche offrono diversi livelli e tipi di informazioni. L'unico valore disponibile in tutte le API è l'deviceName, che è una descrizione in testo libero del dispositivo fisico, dell'adattatore, oppure una combinazione delle stringhe riportate per GL_VENDOR + GL_RENDERER + GL_VERSION. L'deviceId è sempre 0 per OpenGL. vendorId è sempre 0 per OpenGL e Metal. deviceType è sempre UnknownDevice per OpenGL e Direct 3D.

Nota: si tratta di un'API RHI con garanzie di compatibilità limitate; per ulteriori dettagli, consultare QRhi.

Documentazione sui tipi di membro

enum QRhiDriverInfo::DeviceType

Specifica il tipo di dispositivo grafico, quando l'informazione è disponibile.

In pratica, ciò è applicabile solo con Vulkan e Metal. Con Direct 3D 11 e 12, l’utilizzo di un adattatore con il flag software impostato porta al valore CpuDevice. In caso contrario, e con OpenGL, il valore è sempre UnknownDevice.

CostanteValore
QRhiDriverInfo::UnknownDevice0
QRhiDriverInfo::IntegratedDevice1
QRhiDriverInfo::DiscreteDevice2
QRhiDriverInfo::ExternalDevice3
QRhiDriverInfo::VirtualDevice4
QRhiDriverInfo::CpuDevice5

Documentazione delle variabili membro

quint64 QRhiDriverInfo::deviceId

Vedi anche QRhi::driverInfo().

QByteArray QRhiDriverInfo::deviceName

Vedi anche QRhi::driverInfo().

QRhiDriverInfo::DeviceType QRhiDriverInfo::deviceType

Vedi anche QRhi::driverInfo() e QRhiDriverInfo::DeviceType.

quint64 QRhiDriverInfo::vendorId

Vedi anche 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.