Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Creating a Vulkan VkSurface from a QWidget
Desperado17 last edited by
I have a widget class that is derived from QWidget. I currently use it to render with OpenGLES. For that purpose, I create an EGLSurface from the underlying native window handle using eglCreateWindowSurface.
Now I plan to switch the rendering to Vulkan which means I have to create a VkSurface instead. However, the only means I know to do that is to use QVulkanWindow which already includes a lot of Vulkan setup stuff I don't need at this point. Also, I'd like to keep my Widget class and only apply minimal changes to it if possible. The QVulkanWindow source
Uses a method surface = QVulkanInstance::surfaceForWindow(q); but it also only seems to work with full QWindow objects.
Is there a way to get a VkSurface from a QWidget instead of a QWindow class?