mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 00:24:12 +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);
|
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
|
static void
|
||||||
R_RenderScene (void)
|
R_RenderScene (void)
|
||||||
{
|
{
|
||||||
|
@ -580,8 +571,6 @@ R_RenderView_ (void)
|
||||||
|
|
||||||
gl_mirror = false;
|
gl_mirror = false;
|
||||||
|
|
||||||
R_Clear ();
|
|
||||||
|
|
||||||
// render normal view
|
// render normal view
|
||||||
R_RenderScene ();
|
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
|
void
|
||||||
gl_R_RenderFrame (SCR_Func scr_3dfunc, SCR_Func *scr_funcs)
|
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
|
//update in sw modes but must in gl mode
|
||||||
vr_data.scr_copyeverything = 1;
|
vr_data.scr_copyeverything = 1;
|
||||||
|
|
||||||
|
R_Clear ();
|
||||||
|
|
||||||
begun = 1;
|
begun = 1;
|
||||||
|
|
||||||
if (r_speeds->int_val) {
|
if (r_speeds->int_val) {
|
||||||
|
|
Loading…
Reference in a new issue