I am integrating imgui into my app using glfw + vulkan example.

The function vkCreateSwapchainKHR() is also called by imgui setup logic in addition to my app on the same device and it fails with "internal drawable creation failed".

Under what circumstances, if any, would this be a valid approach?

Should my app and imgui share the same swapchain?


The Vulkan specification is very clear on this:

A native window cannot be associated with more than one non-retired swapchain at a time.

You can create a new swapchain for a surface, but only by passing the old swapchain as the oldSwapchain parameter, which will cause the old swapchain to enter the retired state.

So yes, both you and imGUI should get on the same page about who owns the swapchain.

  • $\begingroup$ Thanks for your response. Is it correct that, I will need to build a separate pipeline for ImGUI; it will only share the surface/swapchain with the actual app? $\endgroup$ – Vectorizer Jun 18 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.