]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
Attempt to make loading screens not stay cached, to avoid loading GPU memory when...
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 14 May 2011 13:03:44 +0000 (13:03 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Sat, 14 May 2011 13:08:22 +0000 (15:08 +0200)
From: MirceaKitsune <sonichedgehog_hyperblast00@yahoo.com>

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11148 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=0b4cff287c2e7d621f0ed198c6e00f976dbf8d31

cl_screen.c

index 60cae502929ddbb7353cb813df57067f7e0e9617..e3756aeb46b79be4a3b6a3c72b05ca70ac479c51 100644 (file)
@@ -2042,7 +2042,7 @@ static void SCR_DrawLoadingScreen_SharedSetup (qboolean clear)
        R_Mesh_Start();
        R_EntityMatrix(&identitymatrix);
        // draw the loading plaque
-       loadingscreenpic = Draw_CachePic (loadingscreenpic_number ? va("gfx/loading%d", loadingscreenpic_number+1) : "gfx/loading");
+       loadingscreenpic = Draw_CachePic_Flags (loadingscreenpic_number ? va("gfx/loading%d", loadingscreenpic_number+1) : "gfx/loading", loadingscreenpic_number ? CACHEPICFLAG_NOTPERSISTENT : 0);
 
        w = loadingscreenpic->width;
        h = loadingscreenpic->height;
@@ -2112,7 +2112,7 @@ static void SCR_DrawLoadingScreen (qboolean clear)
                R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
        }
        R_Mesh_PrepareVertices_Generic_Arrays(4, loadingscreenpic_vertex3f, NULL, loadingscreenpic_texcoord2f);
-       R_SetupShader_Generic(loadingscreenpic->tex, NULL, GL_MODULATE, 1);
+       R_SetupShader_Generic(Draw_GetPicTexture(loadingscreenpic), NULL, GL_MODULATE, 1);
        R_Mesh_Draw(0, 4, 0, 2, polygonelement3i, NULL, 0, polygonelement3s, NULL, 0);
        SCR_DrawLoadingStack();
 }