mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
[gl] Move clearing to screen's render frame
This allows 2d-only to be cleared properly.
This commit is contained in:
parent
88c9517629
commit
204578772d
2 changed files with 11 additions and 11 deletions
|
@ -449,15 +449,6 @@ R_SetupGL (void)
|
|||
qfglShadeModel (GL_FLAT);
|
||||
}
|
||||
|
||||
static void
|
||||
R_Clear (void)
|
||||
{
|
||||
if (gl_clear->int_val)
|
||||
qfglClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else
|
||||
qfglClear (GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
static void
|
||||
R_RenderScene (void)
|
||||
{
|
||||
|
@ -580,8 +571,6 @@ R_RenderView_ (void)
|
|||
|
||||
gl_mirror = false;
|
||||
|
||||
R_Clear ();
|
||||
|
||||
// render normal view
|
||||
R_RenderScene ();
|
||||
|
||||
|
|
|
@ -190,6 +190,15 @@ SCR_TileClear (void)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
R_Clear (void)
|
||||
{
|
||||
if (gl_clear->int_val)
|
||||
qfglClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else
|
||||
qfglClear (GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
void
|
||||
gl_R_RenderFrame (SCR_Func scr_3dfunc, SCR_Func *scr_funcs)
|
||||
{
|
||||
|
@ -207,6 +216,8 @@ gl_R_RenderFrame (SCR_Func scr_3dfunc, SCR_Func *scr_funcs)
|
|||
//update in sw modes but must in gl mode
|
||||
vr_data.scr_copyeverything = 1;
|
||||
|
||||
R_Clear ();
|
||||
|
||||
begun = 1;
|
||||
|
||||
if (r_speeds->int_val) {
|
||||
|
|
Loading…
Reference in a new issue