Renderer::~Renderer(void) { UnloadTextures(); // if renderer is null and window then just leave if(renderer == nullptr && window == nullptr) return; SDL_DestroyRenderer(renderer); SDL_DestroyWindow(window); IMG_Quit(); SDL_Quit(); }
void FGearVRSplash::Shutdown() { SplashIsShown = false; UnloadTextures(); LayerMgr->RemoveAllLayers(); FCustomPresent* pCustomPresent = pPlugin->GetCustomPresent_Internal(); if (pCustomPresent) { pCustomPresent->UnlockSubmitFrame(); } ShowingBlack = false; LayerMgr->Shutdown(); FAsyncLoadingSplash::Shutdown(); }
void ResetTextures (int bReload, int bGame) { if (gameStates.app.bInitialized && ogl.m_states.bInitialized) { textureManager.Destroy (); if (lightmapManager.HaveLightmaps ()) lightmapManager.Release (); DestroyGlareDepthTexture (); if (bReload) fontManager.Remap (); if (bGame) { hudIcons.Destroy (); //ResetHoardData (); particleImageManager.FreeAll (); FreeExtraImages (); LoadAddonImages (); FreeStringPool (); OOF_ReleaseTextures (); ASE_ReleaseTextures (); if (bReload) { for (;;) { try { OglCacheLevelTextures (); } catch (int e) { if (e == EX_OUT_OF_MEMORY) { if (!gameOpts->render.textures.nQuality) { throw (e); } textureManager.Destroy (); UnloadTextures (); --gameOpts->render.textures.nQuality; continue; } else { throw (e); } } break; } OOF_ReloadTextures (); ASE_ReloadTextures (); } } } }
//----------------------------------------------------------------------------------------------- int WINAPI WinMain( HINSTANCE applicationInstanceHandle, HINSTANCE, LPSTR commandLineString, int ) { ParseCommandLineArgument( commandLineString ); if( !g_isQuitting ) Initialize( applicationInstanceHandle ); while( !g_isQuitting ) { RunFrame(); } UnloadTextures(); g_game.Destruct(); #if defined( _WIN32 ) && defined( _DEBUG ) assert( _CrtCheckMemory() ); _CrtDumpMemoryLeaks(); #endif return 0; }
void dxRenderer::Shutdown() { if (!inited) { return; } inited = false; SetColorMappings(1.0f); UnloadTextures(); GL_UnloadTempTexture(texture_text); texture_text = 0; GL_DestroyProg(program_alpha); GL_DestroyProg(program_opaque); GL_DestroyVertexBuffer(vertbuf_sky); GL_DestroyVertexBuffer(texcoordbuf_sky); GL_DestroyProg(program_sky); }
STGResources::~STGResources() { UnloadTextures(); UnloadSounds(); }