From: divverent Date: Sat, 14 May 2011 13:03:44 +0000 (+0000) Subject: Attempt to make loading screens not stay cached, to avoid loading GPU memory when... X-Git-Tag: xonotic-v0.6.0~163^2~398 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0b4cff287c2e7d621f0ed198c6e00f976dbf8d31;p=xonotic%2Fdarkplaces.git 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 --- 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(); }