QRhiAdapter Class
表示一个物理图形设备。更多内容...
| 头文件: | #include <rhi/qrhi.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS GuiPrivate) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
| qmake: | QT += gui-private |
| 自: | Qt 6.10 |
公共函数
| virtual QRhiDriverInfo | info() const = 0 |
详细说明
某些QRhi 后端针对的是那些公开了adapters 或physical devices 概念的图形API。调用静态函数enumerateAdapters()可获取系统中存在的适配器列表。 将返回的QRhiAdapter对象之一传递给create(),以请求使用该QRhiAdapter所对应的适配器或物理设备。除了提供QRhiDriverInfo 接口外,QRhiAdapter应被视为一个不透明句柄。
注意:在 Vulkan中, QRhiAdapter 的有效性取决于用于调用 `enumerateAdapters()` 的 `QVulkanInstance ` 是否有效。这也意味着 QRhiAdapter 与 Vulkan 实例(`QVulkanInstance`、`VkInstance`)绑定,无法在其他 Vulkan 实例的上下文中使用。
注意:这是一个 兼容性保证有限的 RHI API,详情请参阅QRhi 。
© 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.