Shows the usage of QVulkanWindow in QWidget 應用程序。
The Hello Vulkan 小部件範例 是變體的 hellovulkantriangle that embeds the QVulkanWindow 成 QWidget -based user interface using QWidget::createWindowContainer ().
The code to set up the Vulkan pipeline and render the triangle is the same as in hellovulkantriangle . In addition, this example demonstrates another feature of QVulkanWindow : reading the image content back from the color buffer into a QImage . By clicking the Grab button, the example renders the next frame and follows it up with a transfer operation in order to get the swapchain color buffer content copied into host accessible memory. The image is then saved to disk via QImage::save ().
要運行範例從 Qt Creator ,打開 歡迎 模式,然後選擇範例從 範例 。更多信息,拜訪 構建和運行範例 .