Hello Vulkan Widgetの例
QWidget アプリケーションにおけるQVulkanWindow の使い方を示します。
Hello Vulkan Widget Exampleは hellovulkantriangleの変形で、QWidget::createWindowContainer ()を使用してQWidget-ベースのユーザーインターフェースにQVulkanWindow 。
Vulkanパイプラインをセットアップして三角形をレンダリングするコードは、hellovulkantriangleと同じです。さらに、この例では、QVulkanWindow のもう1つの機能である、カラーバッファからQImage に画像コンテンツを読み戻すことを示します。Grab ボタンをクリックすることで、この例では次のフレームをレンダリングし、スワップチェーンのカラーバッファコンテンツをホストアクセス可能なメモリにコピーするために、転送操作でそれをフォローアップします。その後、画像はQImage::save() を介してディスクに保存されます。
例の実行
からサンプルを実行するには 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.