本页内容

QRhiD3D11NativeHandles Struct

保存QRhi 所使用的 D3D 设备和设备上下文。更多内容...

头文件: #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
继承自: QRhiNativeHandles

公共变量

qint32 adapterLuidHigh
quint32 adapterLuidLow
void *context
void *dev
int featureLevel

详细说明

注意:该类 使用void * 作为类型,因为在此处不允许包含基于 COM 的d3d11.h 头文件。实际类型为ID3D11Device * 和ID3D11DeviceContext * 。

注意:这是一个 兼容性保证有限的 RHI API,详情请参阅QRhi 。

成员变量文档

qint32 QRhiD3D11NativeHandles::adapterLuidHigh

要使用的 DXGI 适配器的本地标识符 (LUID) 的高位部分。仅在调用 `QRhi ` 创建设备时相关,导入设备和设备上下文时将被忽略。

quint32 QRhiD3D11NativeHandles::adapterLuidLow

要使用的 DXGI 适配器的本地标识符(LUID)的低位部分。仅在调用 `QRhi ` 创建设备时相关,导入设备和设备上下文时将被忽略。

void *QRhiD3D11NativeHandles::context

指向一个ID3D11DeviceContext对象;如果不需导入现有的设备上下文,则该参数应设置为nullptr 。

注意: 导入设备时, 设备和设备上下文都必须设置为有效的对象。

void *QRhiD3D11NativeHandles::dev

指向一个ID3D11Device对象;如果不导入现有设备,则将其设置为nullptr 。

注意: 导入设备时, 设备和设备上下文都必须设置为有效的对象。

int QRhiD3D11NativeHandles::featureLevel

指定传递给D3D11CreateDevice() 的功能级别。仅在通过QRhi 创建设备时有效;导入设备和设备上下文时将被忽略。若未设置,则适用 D3D 文档中概述的默认规则。

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