Hello Vulkan キューブの例
QVulkanWindow の基本的な使い方を示します。
Hello Vulkan Cubes Exampleは、QVulkanWindow のより高度な使い方を示しています。
この例では、ファイルからロードされたメッシュと、2つの異なるマテリアルと、対応するグラフィックパイプラインがあります。丸みを帯びたキューブは、インスタンス化を使用して描画され、単一の指向性ライトを持つPhongライティングモデルを備えています。
hellovulkantextureやhellovulkantriangleとは異なり、ユニフォームバッファの処理では、複数の記述子セットの代わりに動的ユニフォームバッファが使用されます。
この例では、QtConcurrent::run()、QFuture 、QFutureWatcher の単純な使い方と、QVulkanWindow の組み合わせを示しているため、QtConcurrent が必要です。メッシュとシェーダーデータの読み込み、高価になる可能性のあるグラフィックパイプラインの構築、フレームコマンドバッファの構築は、すべて別々のワーカースレッドで行われます。
シーンはウィジェットベースのユーザーインターフェースに組み込まれています。QVulkanWindow サブクラスは、シーン内を移動できるように一人称スタイルのカメラを提供するため、マウスとキーボード入力も処理します。
例の実行
からサンプルを実行するには Qt Creatorからサンプルを実行するには、Welcome モードを開き、Examples からサンプルを選択します。詳しくは、Building and Running an Exampleをご覧ください。
© 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.