- removed unused GLFLat::sub and all codes depending on it a valid pointer.

This commit is contained in:
Christoph Oelckers 2016-08-26 00:04:29 +02:00
parent 6755cb2a25
commit f6544f3c44
3 changed files with 70 additions and 97 deletions

View file

@ -647,13 +647,6 @@ void GLFlat::DrawSubsectorLights(subsector_t * sub, int pass)
void GLFlat::DrawLightsCompat(int pass)
{
gl_RenderState.Apply();
if (sub)
{
// This represents a single subsector
DrawSubsectorLights(sub, pass);
}
else
{
// Draw the subsectors belonging to this sector
for (int i = 0; i<sector->subsectorcount; i++)
{
@ -678,7 +671,6 @@ void GLFlat::DrawLightsCompat(int pass)
}
}
}
}
//==========================================================================

View file

@ -204,13 +204,6 @@ void GLFlat::ProcessLights(bool istrans)
{
dynlightindex = GLRenderer->mLights->GetIndexPtr();
if (sub)
{
// This represents a single subsector
SetupSubsectorLights(GLPASS_LIGHTSONLY, sub);
}
else
{
// Draw the subsectors belonging to this sector
for (int i=0; i<sector->subsectorcount; i++)
{
@ -235,7 +228,6 @@ void GLFlat::ProcessLights(bool istrans)
}
}
}
}
//==========================================================================
@ -249,14 +241,6 @@ void GLFlat::DrawSubsectors(int pass, bool processlights, bool istrans)
int dli = dynlightindex;
gl_RenderState.Apply();
if (sub)
{
// This represents a single subsector
if (processlights) SetupSubsectorLights(GLPASS_ALL, sub, &dli);
DrawSubsector(sub);
}
else
{
if (vboindex >= 0)
{
int index = vboindex;
@ -305,7 +289,6 @@ void GLFlat::DrawSubsectors(int pass, bool processlights, bool istrans)
}
}
}
}
//==========================================================================
@ -565,7 +548,6 @@ void GLFlat::ProcessSector(sector_t * frontsector)
// Get the real sector for this one.
sector = &sectors[frontsector->sectornum];
extsector_t::xfloor &x = sector->e->XFloor;
this->sub = NULL;
dynlightindex = -1;
byte &srf = gl_drawinfo->sectorrenderflags[sector->sectornum];

View file

@ -288,7 +288,6 @@ public:
friend struct GLDrawList;
sector_t * sector;
subsector_t * sub; // only used for translucent planes
float dz; // z offset for rendering hacks
float z; // the z position of the flat (only valid for non-sloped planes)
FMaterial *gltexture;