mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 14:52:08 +00:00
Dabb, try this...
This commit is contained in:
parent
ee3f88d57d
commit
6d62a506b2
1 changed files with 6 additions and 41 deletions
|
@ -120,7 +120,6 @@ cvar_t *gl_finish;
|
|||
|
||||
cvar_t *r_skyname;
|
||||
|
||||
extern cvar_t *gl_ztrick;
|
||||
extern cvar_t *scr_fov;
|
||||
|
||||
extern byte gammatable[256];
|
||||
|
@ -1042,47 +1041,13 @@ R_Clear
|
|||
*/
|
||||
void R_Clear (void)
|
||||
{
|
||||
if (r_mirroralpha->value != 1.0)
|
||||
{
|
||||
if (gl_clear->value)
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else
|
||||
glClear (GL_DEPTH_BUFFER_BIT);
|
||||
gldepthmin = 0;
|
||||
gldepthmax = 0.5;
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
}
|
||||
else if (gl_ztrick->value)
|
||||
{
|
||||
static int trickframe;
|
||||
|
||||
if (gl_clear->value)
|
||||
glClear (GL_COLOR_BUFFER_BIT);
|
||||
|
||||
trickframe++;
|
||||
if (trickframe & 1)
|
||||
{
|
||||
gldepthmin = 0;
|
||||
gldepthmax = 0.49999;
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
gldepthmin = 1;
|
||||
gldepthmax = 0.5;
|
||||
glDepthFunc (GL_GEQUAL);
|
||||
}
|
||||
}
|
||||
if (gl_clear->value)
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else
|
||||
{
|
||||
if (gl_clear->value)
|
||||
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
else
|
||||
glClear (GL_DEPTH_BUFFER_BIT);
|
||||
gldepthmin = 0;
|
||||
gldepthmax = 1;
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
}
|
||||
glClear (GL_DEPTH_BUFFER_BIT);
|
||||
gldepthmin = 0;
|
||||
gldepthmax = 1;
|
||||
glDepthFunc (GL_LEQUAL);
|
||||
|
||||
glDepthRange (gldepthmin, gldepthmax);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue