What does VK_ERROR_NATIVE_WINDOW_IN_USE_KHR mean

Viewed 565

I am folowing the vulkan tutorial from vulkan-tutorial.com and when I try to recreate the swapchain vulkan gives me this error. I was not able to find out from the internet what causes this error. The question is what causes the VK_ERROR_NATIVE_WINDOW_IN_USE_KHR error.

1 Answers

VK_ERROR_NATIVE_WINDOW_IN_USE_KHR means that window already has a swapchain. A window can only have one swapchain (counting even other API's swapchains like OpenGL and DXGI).

If you recreate the swapchain, you must either first destroy the old swapchain, or you must provide it to the oldSwapchain parameter.

Related