"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+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1233 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
ewasylishen 2015-06-15 22:52:29 +00:00
parent 79431b9c9e
commit 84422cfe79

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_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.next = cache_head.prev = &cache_head;
cache_head.lru_next = cache_head.lru_prev = &cache_head; cache_head.lru_next = cache_head.lru_prev = &cache_head;
Cmd_AddCommand ("flush", Cache_Flush); Cmd_AddCommand ("flush", Cache_FlushReload);
} }
/* /*