- when rendering mirrors, discard subsectors lying behind them.

This commit is contained in:
Christoph Oelckers 2016-01-27 12:02:43 +01:00
commit 3c16a23865
3 changed files with 21 additions and 7 deletions

View file

@ -361,11 +361,6 @@ static void DoSubsector(subsector_t * sub)
sector_t * fakesector;
sector_t fake;
// check for visibility of this entire subsector. This requires GL nodes.
// (disabled because it costs more time than it saves.)
//if (!clipper.CheckBox(sub->bbox)) return;
#ifdef _DEBUG
if (sub->sector-sectors==931)
{
@ -387,6 +382,14 @@ static void DoSubsector(subsector_t * sub)
UnclipSubsector(sub);
}
if (GLRenderer->mCurrentPortal)
{
int clipres = GLRenderer->mCurrentPortal->ClipSubsector(sub);
if (clipres == GLPortal::PClip_InFront) return;
}
fakesector=gl_FakeFlat(sector, &fake, false);
if (sector->validcount != validcount)