mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-10 06:31:40 +00:00
Don't bother making an amod display list cache
This commit is contained in:
parent
8558301901
commit
06d658573c
2 changed files with 3 additions and 58 deletions
|
@ -358,56 +358,7 @@ void GL_MakeAliasModelDisplayLists (model_t *m, aliashdr_t *hdr)
|
|||
aliasmodel = m;
|
||||
paliashdr = hdr; // (aliashdr_t *)Mod_Extradata (m);
|
||||
|
||||
//
|
||||
// look for a cached version
|
||||
//
|
||||
char cache[MAX_QPATH];
|
||||
sprintf(cache, "%s/glquake/", com_gamedir);
|
||||
COM_StripExtension (m->name+strlen("progs/"), cache+strlen(cache));
|
||||
strcat (cache, ".ms2");
|
||||
|
||||
int f;
|
||||
Sys_FileOpenRead(cache, &f);
|
||||
if (f >= 0)
|
||||
{
|
||||
Sys_FileRead(f, &numcommands, 4);
|
||||
Sys_FileRead(f, &numorder, 4);
|
||||
Sys_FileRead(f, &commands, numcommands * sizeof(commands[0]));
|
||||
Sys_FileRead(f, &vertexorder, numorder * sizeof(vertexorder[0]));
|
||||
Sys_FileClose(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
char dirName[MAX_OSPATH];
|
||||
|
||||
//
|
||||
// build it from scratch
|
||||
//
|
||||
BuildTris (); // trifans or lists
|
||||
|
||||
// Create a dir to put the cache file in.
|
||||
memset(dirName, 0, MAX_OSPATH);
|
||||
sprintf(dirName, "%s/glquake", com_gamedir);
|
||||
Sys_mkdir(dirName);
|
||||
|
||||
//
|
||||
// save out the cached version
|
||||
//
|
||||
f = Sys_FileOpenWrite(cache);
|
||||
if (f >= 0)
|
||||
{
|
||||
Sys_FileWrite(f, &numcommands, 4);
|
||||
Sys_FileWrite(f, &numorder, 4);
|
||||
Sys_FileWrite(f, &commands, numcommands * sizeof(commands[0]));
|
||||
Sys_FileWrite(f, &vertexorder, numorder * sizeof(vertexorder[0]));
|
||||
Sys_FileClose(f);
|
||||
}
|
||||
else
|
||||
{
|
||||
Sys_Error("Couldn't open %s for writing", cache);
|
||||
}
|
||||
}
|
||||
|
||||
BuildTris();
|
||||
|
||||
// save the data out
|
||||
|
||||
|
|
|
@ -893,17 +893,11 @@ void R_RenderBrushPoly (msurface_t *fa)
|
|||
|
||||
if(r_showtris.value) //Crow_bar
|
||||
{
|
||||
if(r_showtris_full.value)
|
||||
sceGuDisable(GU_DEPTH_TEST);
|
||||
else
|
||||
sceGuDepthMask (GU_TRUE);
|
||||
sceGuDepthMask (GU_TRUE);
|
||||
|
||||
DrawTrisPoly (fa->polys);
|
||||
|
||||
if(r_showtris_full.value)
|
||||
sceGuEnable(GU_DEPTH_TEST);
|
||||
else
|
||||
sceGuDepthMask (GU_FALSE);
|
||||
sceGuDepthMask (GU_FALSE);
|
||||
}
|
||||
|
||||
if (fa->flags & SURF_DRAWSKY)
|
||||
|
|
Loading…
Reference in a new issue