QRhiD3D11NativeHandles Struct

保存QRhi 使用的 D3D 设备和设备上下文

头文件: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS Gui)
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 文档中列出的默认规则。

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