シーングラフ - QML 環境下での Direct3D 11
Qt Quick シーン内でDirect3D 11を使用して直接レンダリングする方法を示します。

「Direct3D 11 Under QML」のサンプルでは、アプリケーションが `QQuickWindow::beforeRendering()` シグナルを利用して、Qt Quick シーン内でカスタム D3D11 コンテンツを描画する方法を示しています。 このシグナルは、各フレームの開始時、シーングラフがレンダリングを開始する前に発火するため、このシグナルに応答して行われる D3D11 の描画コールは、すべてQt Quick アイテムの下に積み重ねられます。
あるいは、Qt Quick シーンの上にD3D11コンテンツをレンダリングしたいアプリケーションは、QQuickWindow::afterRendering()シグナルに接続することでこれを実現できます。
この例では、D3D11 のレンダリングに影響を与える値を QML に公開する方法についても説明します。QML ファイル内の `NumberAnimation ` を使用してしきい値をアニメーション化し、この値はスクエアサークルを描画する HLSL シェーダープログラムで使用されます。
この例は、多くの点で「OpenGL Under QML」、「Metal Under QML」、および「Vulkan Under QML」の例と同等であり、これらはすべて、異なるネイティブAPIを経由しているだけで、同じカスタムコンテンツをレンダリングしています。
© 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.