"flush" command: Call a wrapper around Cache_Flush that also does GLMesh_LoadVertexBuffers.

"flush" command is used by modders to view modified mdl files. need to call GLMesh_LoadVertexBuffers to keep that use case working with GLSL renderer.

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1233 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Eric Wasylishen 2015-06-15 22:52:29 +00:00
parent b94df5a4cd
commit 286ffcb95a

View file

@ -804,6 +804,19 @@ void Cache_Flush (void)
Cache_Free ( cache_head.next->user, true); // reclaim the space //johnfitz -- added second argument
}
/*
============
Cache_FlushReload
ericw -- "flush" command is used by modders to view modified mdl files. need to
call GLMesh_LoadVertexBuffers to keep that use case working with GLSL renderer.
============
*/
static void Cache_FlushReload (void)
{
Cache_Flush ();
GLMesh_LoadVertexBuffers ();
}
/*
============
@ -843,7 +856,7 @@ void Cache_Init (void)
cache_head.next = cache_head.prev = &cache_head;
cache_head.lru_next = cache_head.lru_prev = &cache_head;
Cmd_AddCommand ("flush", Cache_Flush);
Cmd_AddCommand ("flush", Cache_FlushReload);
}
/*