Remove unneeded code from OpenGL2's RB_RenderDrawSurfList

Make it more similar to OpenGL1.
This commit is contained in:
Zack Middleton 2017-06-02 22:58:22 -05:00
parent 1aa20487a4
commit 66fec1b059

View file

@ -475,9 +475,6 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
FBO_t* fbo = NULL;
qboolean inQuery = qfalse;
float depth[2];
// save original time for entity shader offsets
originalTime = backEnd.refdef.floatTime;
@ -495,9 +492,6 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
oldCubemapIndex = -1;
oldSort = -1;
depth[0] = 0.f;
depth[1] = 1.f;
backEnd.pc.c_surfaces += numDrawSurfs;
for (i = 0, drawSurf = drawSurfs ; i < numDrawSurfs ; i++, drawSurf++) {
@ -538,7 +532,6 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
// change the modelview matrix if needed
//
if ( entityNum != oldEntityNum ) {
qboolean sunflare = qfalse;
depthRange = isCrosshair = qfalse;
if ( entityNum != REFENTITYNUM_WORLD ) {
@ -605,11 +598,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
}
if(!oldDepthRange)
{
depth[0] = 0;
depth[1] = 0.3f;
qglDepthRange (depth[0], depth[1]);
}
qglDepthRange (0, 0.3);
}
else
{
@ -618,11 +607,7 @@ void RB_RenderDrawSurfList( drawSurf_t *drawSurfs, int numDrawSurfs ) {
GL_SetProjectionMatrix( backEnd.viewParms.projectionMatrix );
}
if (!sunflare)
qglDepthRange (0, 1);
depth[0] = 0;
depth[1] = 1;
}
oldDepthRange = depthRange;