SwapChain::~SwapChain() { DestroySwapChainImages(); DestroySwapChain(); DestroyRenderPass(); DestroySurface(); }
//---------------------------------------------------------------------------- // Cleans up and stops D3D, and closes the window. //---------------------------------------------------------------------------- D3D_PUBLIC void D3DWnd_Shutdown( void ) { DestroyDevice(); DestroySwapChain(); ::UnregisterClass( WINDOW_CLASS_NAME, g_wv.hInstance ); ::DestroyWindow( g_hWnd ); g_hWnd = NULL; }
bool SwapChain::RecreateSurface(void* native_handle) { // Destroy the old swap chain, images, and surface. DestroyRenderPass(); DestroySwapChainImages(); DestroySwapChain(); DestroySurface(); // Re-create the surface with the new native handle m_native_handle = native_handle; m_surface = CreateVulkanSurface(g_vulkan_context->GetVulkanInstance(), native_handle); if (m_surface == VK_NULL_HANDLE) return false; // Finally re-create the swap chain if (!CreateSwapChain() || !SetupSwapChainImages() || !CreateRenderPass()) return false; return true; }
void D3DWin8_Shutdown() { DestroyDevice(); DestroySwapChain(); }