mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +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 (void);
|
||||||
void R_Init_Cvars (void);
|
void R_Init_Cvars (void);
|
||||||
void R_InitEfrags (void);
|
void R_InitEfrags (void);
|
||||||
|
void R_ClearState (void);
|
||||||
void R_InitSky (struct texture_s *mt); // called at level load
|
void R_InitSky (struct texture_s *mt); // called at level load
|
||||||
void R_Textures_Init (void);
|
void R_Textures_Init (void);
|
||||||
void R_RenderView (void); // must set r_refdef first
|
void R_RenderView (void); // must set r_refdef first
|
||||||
|
|
|
@ -947,3 +947,11 @@ R_RenderViewFishEye (void)
|
||||||
qfglMatrixMode (GL_MODELVIEW);
|
qfglMatrixMode (GL_MODELVIEW);
|
||||||
qfglCallList (fisheye_grid);
|
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;
|
time = stop - start;
|
||||||
Sys_MaskPrintf (SYS_DEV, "%f seconds (%f fps)\n", time, 128 / time);
|
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)
|
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)
|
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 ();
|
CL_ClearTEnts ();
|
||||||
|
|
||||||
R_ClearEfrags ();
|
R_ClearState ();
|
||||||
R_ClearDlights ();
|
|
||||||
R_ClearParticles ();
|
|
||||||
|
|
||||||
CL_ClearEnts ();
|
CL_ClearEnts ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -496,7 +496,6 @@ void
|
||||||
Host_ClearMemory (void)
|
Host_ClearMemory (void)
|
||||||
{
|
{
|
||||||
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||||
D_FlushCaches ();
|
|
||||||
Mod_ClearAll ();
|
Mod_ClearAll ();
|
||||||
if (host_hunklevel)
|
if (host_hunklevel)
|
||||||
Hunk_FreeToLowMark (host_hunklevel);
|
Hunk_FreeToLowMark (host_hunklevel);
|
||||||
|
|
|
@ -131,11 +131,6 @@ CL_StopPlayback (void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
D_FlushCaches (void)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
IN_ProcessEvents (void)
|
IN_ProcessEvents (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -413,7 +413,6 @@ CL_ClearState (void)
|
||||||
CL_Init_Entity (&cl.viewent);
|
CL_Init_Entity (&cl.viewent);
|
||||||
|
|
||||||
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
Sys_MaskPrintf (SYS_DEV, "Clearing memory\n");
|
||||||
D_FlushCaches ();
|
|
||||||
Mod_ClearAll ();
|
Mod_ClearAll ();
|
||||||
if (host_hunklevel) // FIXME: check this...
|
if (host_hunklevel) // FIXME: check this...
|
||||||
Hunk_FreeToLowMark (host_hunklevel);
|
Hunk_FreeToLowMark (host_hunklevel);
|
||||||
|
@ -421,9 +420,7 @@ CL_ClearState (void)
|
||||||
CL_ClearEnts ();
|
CL_ClearEnts ();
|
||||||
CL_ClearTEnts ();
|
CL_ClearTEnts ();
|
||||||
|
|
||||||
R_ClearEfrags ();
|
R_ClearState ();
|
||||||
R_ClearDlights ();
|
|
||||||
R_ClearParticles ();
|
|
||||||
|
|
||||||
SZ_Clear (&cls.netchan.message);
|
SZ_Clear (&cls.netchan.message);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue