Skip to content
Snippets Groups Projects
Commit c967672a authored by Sebastian Gaida's avatar Sebastian Gaida
Browse files

[#89] fixed destruction of Swapchain and Surface

parent a3df9dc7
No related branches found
No related tags found
1 merge request!90Resolve "Mehrere Fenster, Abhängigkeiten von Core zu Fenster+Swapchain etc"
Pipeline #26960 failed
...@@ -34,8 +34,16 @@ namespace vkcv { ...@@ -34,8 +34,16 @@ namespace vkcv {
vkcv_log(LogLevel::ERROR, "Invalid id"); vkcv_log(LogLevel::ERROR, "Invalid id");
return; return;
} }
m_context->getDevice().destroySwapchainKHR(m_swapchains[id].getSwapchain()); Swapchain& swapchain = m_swapchains[id];
m_context->getInstance().destroySurfaceKHR(m_swapchains[id].getSurface());
if(swapchain.m_Swapchain){
m_context->getDevice().destroySwapchainKHR(swapchain.m_Swapchain);
}
if(swapchain.m_Surface.handle) {
m_context->getInstance().destroySurfaceKHR(swapchain.m_Surface.handle);
}
swapchain.m_Swapchain = nullptr;
swapchain.m_Surface.handle = nullptr;
} }
void SwapchainManager::signalRecreation(const SwapchainHandle handle) { void SwapchainManager::signalRecreation(const SwapchainHandle handle) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment