From 0b4cff287c2e7d621f0ed198c6e00f976dbf8d31 Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 14 May 2011 13:03:44 +0000 Subject: [PATCH] Attempt to make loading screens not stay cached, to avoid loading GPU memory when having high resolution loading images. From: MirceaKitsune git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11148 d7cf8633-e32d-0410-b094-e92efae38249 --- cl_screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cl_screen.c b/cl_screen.c index 60cae502..e3756aeb 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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(); } -- 2.39.2