mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Clean up glDepthFunc and glDepthRange so it's properly initted, and not set needlessly every frame.
This commit is contained in:
parent
f5c6312743
commit
63ac10dfde
1 changed files with 5 additions and 9 deletions
|
@ -118,6 +118,10 @@ void R_MarkLeaves (void);
|
||||||
void
|
void
|
||||||
glrmain_init (void)
|
glrmain_init (void)
|
||||||
{
|
{
|
||||||
|
gldepthmin = 0;
|
||||||
|
gldepthmax = 1;
|
||||||
|
qfglDepthFunc (GL_LEQUAL);
|
||||||
|
qfglDepthRange (gldepthmin, gldepthmax);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void
|
inline void
|
||||||
|
@ -975,11 +979,6 @@ R_Clear (void)
|
||||||
qfglClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
qfglClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
else
|
else
|
||||||
qfglClear (GL_DEPTH_BUFFER_BIT);
|
qfglClear (GL_DEPTH_BUFFER_BIT);
|
||||||
gldepthmin = 0;
|
|
||||||
gldepthmax = 1;
|
|
||||||
qfglDepthFunc (GL_LEQUAL);
|
|
||||||
|
|
||||||
qfglDepthRange (gldepthmin, gldepthmax);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1040,15 +1039,13 @@ R_Mirror (void)
|
||||||
gldepthmin = 0.5;
|
gldepthmin = 0.5;
|
||||||
gldepthmax = 1;
|
gldepthmax = 1;
|
||||||
qfglDepthRange (gldepthmin, gldepthmax);
|
qfglDepthRange (gldepthmin, gldepthmax);
|
||||||
qfglDepthFunc (GL_LEQUAL);
|
|
||||||
|
|
||||||
R_RenderScene ();
|
R_RenderScene ();
|
||||||
R_DrawWaterSurfaces ();
|
R_DrawWaterSurfaces ();
|
||||||
|
|
||||||
gldepthmin = 0;
|
gldepthmin = 0;
|
||||||
gldepthmax = 1; // XXX 0.5;
|
gldepthmax = 1;
|
||||||
qfglDepthRange (gldepthmin, gldepthmax);
|
qfglDepthRange (gldepthmin, gldepthmax);
|
||||||
qfglDepthFunc (GL_LEQUAL);
|
|
||||||
|
|
||||||
// blend on top
|
// blend on top
|
||||||
qfglMatrixMode (GL_PROJECTION);
|
qfglMatrixMode (GL_PROJECTION);
|
||||||
|
@ -1182,7 +1179,6 @@ R_CullBlocked (vec3_t mins, vec3_t maxs, vec3_t org)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check the corners...
|
// Check the corners...
|
||||||
if ( Mod_PointInLeaf(maxs, cl.worldmodel)->contents != CONTENTS_SOLID)
|
if ( Mod_PointInLeaf(maxs, cl.worldmodel)->contents != CONTENTS_SOLID)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue