/* =============== RE_Shutdown =============== */ void RE_Shutdown(qboolean destroyWindow) { Ren_Print("RE_Shutdown( %i )\n", destroyWindow); ri.Cmd_RemoveSystemCommand("imagelist"); ri.Cmd_RemoveSystemCommand("shaderlist"); ri.Cmd_RemoveSystemCommand("skinlist"); ri.Cmd_RemoveSystemCommand("modellist"); ri.Cmd_RemoveSystemCommand("modelist"); ri.Cmd_RemoveSystemCommand("screenshot"); ri.Cmd_RemoveSystemCommand("screenshotJPEG"); ri.Cmd_RemoveSystemCommand("gfxinfo"); ri.Cmd_RemoveSystemCommand("minimize"); ri.Cmd_RemoveSystemCommand("taginfo"); // keep a backup of the current images if possible // clean out any remaining unused media from the last backup R_PurgeCache(); if (r_cache->integer) { if (tr.registered) { if (destroyWindow) { R_IssuePendingRenderCommands(); R_DeleteTextures(); } else { // backup the current media R_BackupModels(); R_BackupShaders(); R_BackupImages(); } } } else if (tr.registered) { R_IssuePendingRenderCommands(); R_DeleteTextures(); } R_DoneFreeType(); R_ShutdownGamma(); // shut down platform specific OpenGL stuff if (destroyWindow) { R_DoGLimpShutdown(); // release the virtual memory R_Hunk_End(); R_FreeImageBuffer(); ri.Tag_Free(); // wipe all render alloc'd zone memory } tr.registered = qfalse; }
/* =============== RE_Shutdown =============== */ void RE_Shutdown( qboolean destroyWindow ) { ri.Printf( PRINT_DEVELOPER, "RE_Shutdown( %i )\n", destroyWindow ); ri.Cmd_RemoveCommand( "modellist" ); ri.Cmd_RemoveCommand( "screenshotPNG" ); ri.Cmd_RemoveCommand( "screenshotJPEG" ); ri.Cmd_RemoveCommand( "screenshot" ); ri.Cmd_RemoveCommand( "imagelist" ); ri.Cmd_RemoveCommand( "shaderlist" ); ri.Cmd_RemoveCommand( "skinlist" ); ri.Cmd_RemoveCommand( "gfxinfo" ); ri.Cmd_RemoveCommand( "modelist" ); ri.Cmd_RemoveCommand( "shaderstate" ); ri.Cmd_RemoveCommand( "taginfo" ); // Ridah ri.Cmd_RemoveCommand( "cropimages" ); // done. R_ShutdownCommandBuffers(); // Ridah, keep a backup of the current images if possible // clean out any remaining unused media from the last backup R_PurgeCache(); if ( r_cache->integer ) { if ( tr.registered ) { if ( destroyWindow ) { R_SyncRenderThread(); R_ShutdownCommandBuffers(); R_DeleteTextures(); } else { // backup the current media R_ShutdownCommandBuffers(); R_BackupModels(); R_BackupShaders(); R_BackupImages(); } } } else if ( tr.registered ) { R_SyncRenderThread(); R_ShutdownCommandBuffers(); R_DeleteTextures(); } R_DoneFreeType(); // shut down platform specific OpenGL stuff if ( destroyWindow ) { GLimp_Shutdown(); // Ridah, release the virtual memory R_Hunk_End(); R_FreeImageBuffer(); ri.Tag_Free(); // wipe all render alloc'd zone memory } tr.registered = qfalse; }