mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-11 15:21:51 +00:00
- 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:
parent
361bb688c8
commit
8a0596893b
5 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue