本页内容

QRhiD3D12NativeHandles Struct

保存QRhi 所使用的D3D12设备。更多内容...

头文件: #include <rhi/qrhi.h>
CMake: find_package(Qt6 REQUIRED COMPONENTS GuiPrivate)
target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate)
qmake: QT += gui-private
继承自: QRhiNativeHandles

公共变量

详细描述

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

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

成员变量文档

qint32 QRhiD3D12NativeHandles::adapterLuidHigh

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

quint32 QRhiD3D12NativeHandles::adapterLuidLow

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

void *QRhiD3D12NativeHandles::commandQueue

设置时,必须指向一个ID3D12CommandQueue。除了设备之外,它还允许可选地导入一个命令队列。

void *QRhiD3D12NativeHandles::dev

指向一个ID3D12Device对象;若无需导入现有设备,则该参数默认设置为 `nullptr `。

int QRhiD3D12NativeHandles::minimumFeatureLevel

指定传递给D3D12CreateDevice() 的最低功能级别。若未设置,则使用D3D_FEATURE_LEVEL_11_0 。详情请参阅此页面。

仅在由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.