- Qt 6.8
- Qt GUI
- C++ Classes
- QtGuiPrivate
- QRhiD3D11NativeHandles
- Qt 6.8.1 Reference Documentation

# QRhiD3D11NativeHandles Struct

Holds the D3D device and device context used by the QRhi. 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.6
Inherits: | QRhiNativeHandles

- List of all members, including inherited members

## Public Variables

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

## Detailed Description

Note: The class uses `void *` as the type since including the COM-based `d3d11.h` headers is not acceptable here. The actual types are `ID3D11Device *` and `ID3D11DeviceContext *`.

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

## Member Variable Documentation

### qint32 QRhiD3D11NativeHandles::adapterLuidHigh

The high part of the local identifier (LUID) of the DXGI adapter to use. Relevant only when QRhi creates the device, ignored when importing a device and device context.

### quint32 QRhiD3D11NativeHandles::adapterLuidLow

The low part of the local identifier (LUID) of the DXGI adapter to use. Relevant only when QRhi creates the device, ignored when importing a device and device context.

### void *QRhiD3D11NativeHandles::context

Points to a ID3D11DeviceContext or left set to `nullptr` if no existing device context is to be imported.

Note: When importing a device, both the device and the device context must be set to valid objects.

### void *QRhiD3D11NativeHandles::dev

Points to a ID3D11Device or left set to `nullptr` if no existing device is to be imported.

Note: When importing a device, both the device and the device context must be set to valid objects.

### int QRhiD3D11NativeHandles::featureLevel

Specifies the feature level passed to D3D11CreateDevice(). Relevant only when QRhi creates the device, ignored when importing a device and device context. When not set, the default rules outlined in the D3D documentation apply.