QVulkanWindow
We already mentioned the modern graphics API named Vulkan. In Qt 5.10 support for Vulkan rendering was added to the Qt framework. We need two classes for rendering our graphics through Vulkan: a global QVulkanInstance object to provide the rendering context, and a QVulkanWindow to do the painting.
Conceptually, QVulkanWindow is the counterpart of QOpenGLWindow in the Vulkan world. However, there's no counterpart for the QOpenGLWidget class, so in order to integrate a Vulkan rendered window into a widget hierarchy, we have to use the QWidget::createWindowContainer() method to create an embeddable wrapper. Note also that we cannot (yet) use QPainter on Vulkan windows or paint devices, as there's no Vulkan backend for QPainter ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access