Use clipper to find visible walls for hw_levelmesh

This commit is contained in:
Magnus Norddahl 2025-05-26 02:03:47 +02:00
commit addddcd8ed
5 changed files with 105 additions and 167 deletions

View file

@ -416,7 +416,6 @@ void DoomLevelMesh::BeginFrame(FLevelLocals& doomMap)
}
FlatUpdateList.Clear();
UpdateWallPortals();
UploadDynLights(doomMap);
Collision->Update();
@ -469,16 +468,9 @@ void DoomLevelMesh::UploadDynLights(FLevelLocals& doomMap)
UploadRanges.DynLight.Add(0, sizeof(int) * 4 + totalsize * sizeof(FDynLightInfo));
}
void DoomLevelMesh::UpdateWallPortals()
TArray<HWWall>& DoomLevelMesh::GetSidePortals(int sideIndex)
{
WallPortals.Clear();
for (int sideIndex : SidePortals)
{
for (HWWall& wall : Sides[sideIndex].WallPortals)
{
WallPortals.Push(&wall);
}
}
return Sides[sideIndex].WallPortals;
}
void DoomLevelMesh::ProcessDecals(HWDrawInfo* di, FRenderState& state)