- fixed: Before rendering a sector stack portal the clipper needs to be completely filled, if the view point's subsector is not inside the portal. If this is not done, some setups where a recursive look into the originating area is possible may exhibit some issues.

This commit is contained in:
Christoph Oelckers 2016-07-23 09:47:14 +02:00
parent 35666f1e09
commit d405cf5b7c

View file

@ -756,6 +756,15 @@ void GLSectorStackPortal::DrawContents()
SaveMapSection();
SetupCoverage();
ClearClipper();
// If the viewpoint is not within the portal, we need to invalidate the entire clip area.
// The portal will re-validate the necessary parts when its subsectors get traversed.
subsector_t *sub = R_PointInSubsector(ViewPos);
if (!(gl_drawinfo->ss_renderflags[sub - ::subsectors] & SSRF_SEEN))
{
clipper.SafeAddClipRange(0, ANGLE_MAX);
}
GLRenderer->DrawScene(DM_PORTAL);
RestoreMapSection();