Vulkan to OpenGL Mid Application Caused Swapchain Creation Failure

OS - Windows 11 Pro | Version - 10.0.22621
CPU - I7-11800H
Video Card - RTX 3070 Laptop GPU
Ram - 16gb

I have a Dear ImGui application that will allow the user to switch from OpenGL to Vulkan, I am more so doing this as a learning exercise and not for any real world situation. I setup a preference page using Dear ImGui with two options under rendering. They are of course OpenGL and Vulkan. I have set up most functionality for the switch to occur but am running into a problem and I wasn’t sure if this was on my end or if there is something special I have to do in order to obtain swapchain creation after destroying OpenGL.

After switching I tear down OpenGL before my next render pass and set my render state in a class I have that keeps track of it globally. Then I call my rendering class deconstructor and create a new one with the current render state. As far as I am aware, this should be like launching directly into my Vulkan version which already works if I choose that in the console once launching the application.

Instead I get a swapchain creation failure with the error being VK_ERROR_OUT_OF_DEVICE_MEMORY. I have been investigating this for about a day or so and in between have been looking online to see if anyone had tried this and got the same error or at least tried it and had it happen successfully. I have not found anything on this at all. Is this a situation that would require an application restart completely to have work, as in, closing and re-launching?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.