QRhiD3D12InitParams Struct
Direct3D 12 固有の初期化パラメータ。詳細...
ヘッダー | #include <rhi/qrhi.h> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Gui) target_link_libraries(mytarget PRIVATE Qt6::GuiPrivate) |
qmake: | QT += gui-private |
継承: | QRhiInitParams |
パブリック変数
bool | enableDebugLayer |
詳細説明
注意: これは互換性保証に制限のある RHI API です。詳細はQRhi を参照してください。
D3D12ベースのQRhi 、初期化に特別なパラメータは必要ありません。必要であれば、enableDebugLayer をtrue
に設定することで、Direct3D デバッグレイヤーを有効にすることができます。これは開発時には便利ですが、製品ビルドでは避けるべきです。
QRhiD3D12InitParams params; params.enableDebugLayer = true; rhi = QRhi::create(QRhi::D3D12, ¶ms);
注意: QRhiSwapChain は、サーフェスタイプがQSurface::Direct3DSurface に設定されているQWindow インスタンスと組み合わせてのみ使用してください。
既存の Direct3D 12 デバイスとの連携
別のグラフィックエンジンと相互運用する場合、同じ Direct3D デバイスを使用するQRhi インスタンスを取得する必要があります。これは、QRhiD3D12NativeHandles へのポインタをQRhi::create() に渡すことで実現できます。QRhi は、外部オブジェクトの所有権を一切持ちません。
例えば、QRhi を OpenXR と組み合わせて使用する場合、デバイスの作成はQRhi に任せ、使用するアダプタと、オプションでデバイスに要求する機能レベルを指定したいことがあります。これは、アダプタの LUID と機能レベルを指定する一方で、デバイスポインタを null に設定することで実現できます。
オプションとして、commandQueue
に NULL 以外の値を設定することで、ID3D12CommandQueue も指定することができる。
© 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.