void Helium::RendererInitializationWin::Shutdown() { DynamicDrawer::DestroyStaticInstance(); RenderResourceManager::DestroyStaticInstance(); Renderer* pRenderer = Renderer::GetStaticInstance(); if( pRenderer ) { pRenderer->Shutdown(); Renderer::DestroyStaticInstance(); } WindowManager* pWindowManager = WindowManager::GetStaticInstance(); if( pWindowManager ) { if( m_pMainWindow ) { m_pMainWindow->Destroy(); while( m_pMainWindow ) { pWindowManager->Update(); } } pWindowManager->Shutdown(); WindowManager::DestroyStaticInstance(); } }
/// Shut down this system. /// /// @see Initialize() void GameSystem::Shutdown() { WorldManager::DestroyStaticInstance(); DynamicDrawer::DestroyStaticInstance(); RenderResourceManager::DestroyStaticInstance(); Renderer* pRenderer = Renderer::GetStaticInstance(); if( pRenderer ) { pRenderer->Shutdown(); Renderer::DestroyStaticInstance(); } WindowManager* pWindowManager = WindowManager::GetStaticInstance(); if( pWindowManager ) { if( m_pMainWindow ) { m_pMainWindow->Destroy(); while( m_pMainWindow ) { pWindowManager->Update(); } } pWindowManager->Shutdown(); WindowManager::DestroyStaticInstance(); } HELIUM_ASSERT( !m_pMainWindow ); JobManager::DestroyStaticInstance(); Config::DestroyStaticInstance(); if( m_pObjectLoaderInitialization ) { m_pObjectLoaderInitialization->Shutdown(); m_pObjectLoaderInitialization = NULL; } if( m_pObjectTypeRegistration ) { m_pObjectTypeRegistration->Unregister(); m_pObjectTypeRegistration = NULL; } GameObjectType::Shutdown(); GameObject::Shutdown(); Reflect::Cleanup(); AsyncLoader::GetStaticInstance().Shutdown(); AsyncLoader::DestroyStaticInstance(); Reflect::ObjectRefCountSupport::Shutdown(); GameObjectPath::Shutdown(); CharName::Shutdown(); WideName::Shutdown(); File::Shutdown(); // Perform base System shutdown last. System::Shutdown(); }