QRhiMetalInitParams Struct
メタル固有の初期化パラメータ。詳細...
ヘッダ | #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 |
継承: | QRhiInitParams |
詳しい説明
注意: これは互換性保証に制限のある RHI API です。詳細はQRhi を参照してください。
Metal ベースのQRhi では、初期化に特別なパラメータは必要ありません。
QRhiMetalInitParams params; rhi = QRhi::create(QRhi::Metal, ¶ms);
注意: Metal APIバリデーションは、QRhi でプログラム的に有効にすることはできません。代わりに、cmake -G Xcode
を介して.xcodeproj
ファイルを生成して XCode でアプリケーションのデバッグビルドを実行するか、環境変数METAL_DEVICE_WRAPPER_TYPE=1
を設定してください。この変数は環境の早い段階で、できればプロセスを開始する前に設定する必要があります。QRhi 作成時に設定しようとしても、実際には機能しません。(おそらく遅すぎる)
注意: QRhiSwapChain は、サーフェスタイプがQSurface::MetalSurface に設定されているQWindow インスタンスのみを対象とすることができます。
既存のメタルデバイスとの連携
他のグラフィックエンジンと相互運用する場合、同じMetalデバイスを使用するQRhi インスタンスを取得する必要があるかもしれません。これは、QRhiMetalNativeHandles へのポインタをQRhi::create() に渡すことで実現できます。このとき、デバイスには NULL 以外の値を設定する必要があります。オプションとして、コマンド・キュー・オブジェクトを指定することもできる。
QRhi は、外部オブジェクトの所有権を一切持ちません。
© 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.