mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 15:01:41 +00:00
Clean up the mess around D_FlushCaches.
Create an R_ClearState and call that from the clients. It calls any necessary functions itself.
This commit is contained in:
parent
33c5320c0e
commit
53d89bf85a
9 changed files with 29 additions and 18 deletions
|
@ -152,6 +152,7 @@ extern int r_viewsize;
|
|||
void R_Init (void);
|
||||
void R_Init_Cvars (void);
|
||||
void R_InitEfrags (void);
|
||||
void R_ClearState (void);
|
||||
void R_InitSky (struct texture_s *mt); // called at level load
|
||||
void R_Textures_Init (void);
|
||||
void R_RenderView (void); // must set r_refdef first
|
||||
|
|
|
@ -947,3 +947,11 @@ R_RenderViewFishEye (void)
|
|||
qfglMatrixMode (GL_MODELVIEW);
|
||||
qfglCallList (fisheye_grid);
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
R_ClearState (void)
|
||||
{
|
||||
R_ClearEfrags ();
|
||||
R_ClearDlights ();
|
||||
R_ClearParticles ();
|
||||
}
|
||||
|
|
|
@ -256,8 +256,3 @@ R_TimeRefresh_f (void)
|
|||
time = stop - start;
|
||||
Sys_MaskPrintf (SYS_DEV, "%f seconds (%f fps)\n", time, 128 / time);
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
D_FlushCaches (void)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -1190,3 +1190,12 @@ void
|
|||
gl_overbright_f (cvar_t *un)
|
||||
{
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
R_ClearState (void)
|
||||
{
|
||||
D_FlushCaches ();
|
||||
R_ClearEfrags ();
|
||||
R_ClearDlights ();
|
||||
R_ClearParticles ();
|
||||
}
|
||||
|
|
|
@ -912,3 +912,12 @@ void
|
|||
gl_overbright_f (cvar_t *un)
|
||||
{
|
||||
}
|
||||
|
||||
VISIBLE void
|
||||
R_ClearState (void)
|
||||
{
|
||||
D_FlushCaches ();
|
||||
R_ClearEfrags ();
|
||||
R_ClearDlights ();
|
||||
R_ClearParticles ();
|
||||
}
|
||||
|
|
|
@ -216,9 +216,7 @@ CL_ClearState (void)
|
|||
|
||||
CL_ClearTEnts ();
|
||||
|
||||
R_ClearEfrags ();
|
||||
R_ClearDlights ();
|
||||
R_ClearParticles ();
|
||||
R_ClearState ();
|
||||
|
||||
CL_ClearEnts ();
|
||||
}
|
||||
|
|
|
@ -496,7 +496,6 @@ void
|
|||
Host_ClearMemory (void)
|
||||
{
|
||||
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||
D_FlushCaches ();
|
||||
Mod_ClearAll ();
|
||||
if (host_hunklevel)
|
||||
Hunk_FreeToLowMark (host_hunklevel);
|
||||
|
|
|
@ -131,11 +131,6 @@ CL_StopPlayback (void)
|
|||
{
|
||||
}
|
||||
|
||||
void
|
||||
D_FlushCaches (void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
IN_ProcessEvents (void)
|
||||
{
|
||||
|
|
|
@ -413,7 +413,6 @@ CL_ClearState (void)
|
|||
CL_Init_Entity (&cl.viewent);
|
||||
|
||||
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||
D_FlushCaches ();
|
||||
Mod_ClearAll ();
|
||||
if (host_hunklevel) // FIXME: check this...
|
||||
Hunk_FreeToLowMark (host_hunklevel);
|
||||
|
@ -421,9 +420,7 @@ CL_ClearState (void)
|
|||
CL_ClearEnts ();
|
||||
CL_ClearTEnts ();
|
||||
|
||||
R_ClearEfrags ();
|
||||
R_ClearDlights ();
|
||||
R_ClearParticles ();
|
||||
R_ClearState ();
|
||||
|
||||
SZ_Clear (&cls.netchan.message);
|
||||
|
||||
|
|
Loading…
Reference in a new issue