Only render line portals once

This commit is contained in:
Magnus Norddahl 2016-12-08 10:29:52 +01:00
commit a1bb6e6b23
3 changed files with 35 additions and 11 deletions

View file

@ -117,6 +117,8 @@ void PolyRenderer::ClearBuffers()
PolyStencilBuffer::Instance()->Clear(RenderTarget->GetWidth(), RenderTarget->GetHeight(), 0);
PolySubsectorGBuffer::Instance()->Resize(RenderTarget->GetPitch(), RenderTarget->GetHeight());
NextStencilValue = 0;
SeenLinePortals.clear();
SeenMirrors.clear();
}
void PolyRenderer::SetSceneViewport()
@ -170,3 +172,13 @@ void PolyRenderer::SetupPerspectiveMatrix()
WorldToClip = TriMatrix::perspective(fovy, ratio, 5.0f, 65535.0f) * worldToView;
}
bool PolyRenderer::InsertSeenLinePortal(FLinePortal *portal)
{
return SeenLinePortals.insert(portal).second;
}
bool PolyRenderer::InsertSeenMirror(line_t *mirrorLine)
{
return SeenMirrors.insert(mirrorLine).second;
}