Skip to content
Snippets Groups Projects

Resolve "Mehrere Fenster, Abhängigkeiten von Core zu Fenster+Swapchain etc"

1 file
+ 10
2
Compare changes
  • Side-by-side
  • Inline
  • c967672a
    [#89] fixed destruction of Swapchain and Surface · c967672a
    Sebastian Gaida authored
@@ -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) {
Loading