Beispiel #1
0
void RE_Shutdown( qboolean destroyWindow ) {	
	ri.Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	ri.Cmd_RemoveCommand ("imagelist");
	ri.Cmd_RemoveCommand ("shaderlist");
	ri.Cmd_RemoveCommand ("skinlist");
	ri.Cmd_RemoveCommand ("modellist");
	ri.Cmd_RemoveCommand ("modelist" );
	ri.Cmd_RemoveCommand ("screenshot");
	ri.Cmd_RemoveCommand ("screenshot_tga");	
	ri.Cmd_RemoveCommand ("gfxinfo");
	ri.Cmd_RemoveCommand ("r_fogDistance");
	ri.Cmd_RemoveCommand ("r_fogColor");
	ri.Cmd_RemoveCommand ("modelcacheinfo");
	ri.Cmd_RemoveCommand ("imagecacheinfo");

	R_ShutdownWorldEffects();
	R_ShutdownFonts();

	if ( tr.registered ) {
		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
		if (destroyWindow)
		{
			R_DeleteTextures();	// only do this for vid_restart now, not during things like map load
		}
	}

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
	tr.registered = qfalse;
}
Beispiel #2
0
void RE_Shutdown( qboolean destroyWindow ) {	
	//VID_Printf( PRINT_ALL, "RE_Shutdown( %i )\n", destroyWindow );

	Cmd_RemoveCommand ("imagelist");
	Cmd_RemoveCommand ("shaderlist");
	Cmd_RemoveCommand ("skinlist");
	Cmd_RemoveCommand ("fontlist");
	Cmd_RemoveCommand ("modellist");
#ifndef _XBOX
	Cmd_RemoveCommand ("modelist" );
	Cmd_RemoveCommand ("r_atihack");
#endif
	Cmd_RemoveCommand ("screenshot");
	Cmd_RemoveCommand ("screenshot_tga");	
	Cmd_RemoveCommand ("gfxinfo");
	Cmd_RemoveCommand ("r_fogDistance");
	Cmd_RemoveCommand ("r_fogColor");
	Cmd_RemoveCommand ("modelcacheinfo");
	Cmd_RemoveCommand ("imagecacheinfo");
	Cmd_RemoveCommand ("r_we");
	Cmd_RemoveCommand ("r_reloadfonts");

	R_ShutdownWorldEffects();
#ifndef _XBOX
	R_TerrainShutdown();
#endif
	R_ShutdownFonts();

	if ( tr.registered ) {
#ifndef _XBOX	// GLOWXXX
		if ( r_DynamicGlow && r_DynamicGlow->integer )
		{
			// Release the Glow Vertex Shader.
			if ( tr.glowVShader )
			{
				qglDeleteProgramsARB( 1, &tr.glowVShader );
			}

			// Release Pixel Shader.
			if ( tr.glowPShader )
			{
				if ( qglCombinerParameteriNV  )
				{
					// Release the Glow Regcom call list.
					qglDeleteLists( tr.glowPShader, 1 );
				}
				else if ( qglGenProgramsARB )
				{
					// Release the Glow Fragment Shader.
					qglDeleteProgramsARB( 1, &tr.glowPShader );
				}
			}

			// Release the scene glow texture.
			qglDeleteTextures( 1, &tr.screenGlow );

			// Release the scene texture.
			qglDeleteTextures( 1, &tr.sceneImage );

			// Release the blur texture.
			qglDeleteTextures( 1, &tr.blurImage );
		}
#endif
//		R_SyncRenderThread();
		R_ShutdownCommandBuffers();
//#ifndef _XBOX
		if (destroyWindow)
//#endif
		{
			R_DeleteTextures();	// only do this for vid_restart now, not during things like map load
		}
	}

	// shut down platform specific OpenGL stuff
	if ( destroyWindow ) {
		GLimp_Shutdown();
	}
	tr.registered = qfalse;
}