QRhiAdapter Class

Represents a physical graphics device. More...

Header: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
Since: Qt 6.10

Public Functions

virtual QRhiDriverInfo info() const = 0

Detailed Description

Some QRhi backends target graphics APIs that expose the concept of adapters or physical devices. Call the static QRhi::enumerateAdapters() function to retrieve a list of the adapters present in the system. Pass one of the returned QRhiAdapter objects to QRhi::create() in order to request using the adapter or physical device the QRhiAdapter corresponds to. Other than exposing the QRhiDriverInfo, QRhiAdapter is to be treated as an opaque handle.

Note: With Vulkan, the QRhiAdapter is valid only as long as the QVulkanInstance that was used for QRhi::enumerateAdapters() is valid. This also means that a QRhiAdapter is tied to the Vulkan instance (QVulkanInstance, VkInstance) and cannot be used in the context of another Vulkan instance.

Note: This is a RHI API with limited compatibility guarantees, see QRhi for details.

Member Function Documentation

[pure virtual] QRhiDriverInfo QRhiAdapter::info() const

Returns the corresponding QRhiDriverInfo.

© 2025 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.