- fixed dynamic light profiling counters.

The draw counters were never incremented and this should be reset only once per scene, not once per viewpoint.
This commit is contained in:
Christoph Oelckers 2018-10-29 10:36:48 +01:00
parent 361bb688c8
commit 8a0596893b
5 changed files with 5 additions and 4 deletions

View File

@ -229,6 +229,8 @@ sector_t *FGLRenderer::RenderView(player_t* player)
}
else
{
iter_dlightf = iter_dlight = draw_dlight = draw_dlightf = 0;
checkBenchActive();
// reset statistics counters

View File

@ -148,7 +148,6 @@ void FDrawInfo::DrawScene(int drawmode)
void FDrawInfo::ProcessScene(bool toscreen)
{
iter_dlightf = iter_dlight = draw_dlight = draw_dlightf = 0;
screen->mPortalState->BeginScene();
int mapsection = R_PointInSubsector(Viewpoint.Pos)->mapsection;

View File

@ -167,7 +167,7 @@ void GLFlat::SetupLights(HWDrawInfo *di, FLightNode * node, FDynLightData &light
}
p.Set(plane.plane.Normal(), plane.plane.fD());
lightdata.GetLight(portalgroup, p, light, false);
draw_dlightf += lightdata.GetLight(portalgroup, p, light, false);
node = node->nextLight;
}

View File

@ -69,7 +69,7 @@ int HWDrawInfo::SetupLightsForOtherPlane(subsector_t * sub, FDynLightData &light
iter_dlightf++;
p.Set(plane->Normal(), plane->fD());
lightdata.GetLight(sub->sector->PortalGroup, p, light, true);
draw_dlightf += lightdata.GetLight(sub->sector->PortalGroup, p, light, true);
node = node->nextLight;
}

View File

@ -354,7 +354,7 @@ void GLWall::SetupLights(HWDrawInfo *di, FDynLightData &lightdata)
}
if (outcnt[0]!=4 && outcnt[1]!=4 && outcnt[2]!=4 && outcnt[3]!=4)
{
lightdata.GetLight(seg->frontsector->PortalGroup, p, node->lightsource, true);
draw_dlight += lightdata.GetLight(seg->frontsector->PortalGroup, p, node->lightsource, true);
}
}
}