QRhiD3D11InitParams Class
Direct3D 11 specific initialization parameters. More...
Header: | #include <QRhiD3D11InitParams> |
qmake: | QT += rhi |
Inherits: | QRhiInitParams |
Public Variables
bool | enableDebugLayer |
Detailed Description
Direct3D 11 specific initialization parameters.
A D3D11-based QRhi needs no special parameters for initialization. If desired, enableDebugLayer can be set to true
to enable the Direct3D debug layer. This can be useful during development, but should be avoided in production builds.
QRhiD3D11InitParams params; params.enableDebugLayer = true; rhi = QRhi::create(QRhi::D3D11, ¶ms);
Note: QRhiSwapChain should only be used in combination with QWindow instances that have their surface type set to QSurface::OpenGLSurface. There are currently no Direct3D specifics in the Windows platform support of Qt and therefore there is no separate QSurface type available.
Working with existing Direct3D 11 devices
When interoperating with another graphics engine, it may be necessary to get a QRhi instance that uses the same Direct3D device. This can be achieved by passing a pointer to a QRhiD3D11NativeHandles to QRhi::create(). Both the device and the device context must be set to a non-null value then.
The QRhi does not take ownership of any of the external objects.
Note: QRhi works with immediate contexts only. Deferred contexts are not used in any way.
Note: Regardless of using an imported or a QRhi-created device context, the ID3D11DeviceContext1
interface (Direct3D 11.1) must be supported. Initialization will fail otherwise.