Implement drawing HWWall portals using the level mesh and occlusion queries

This commit is contained in:
Magnus Norddahl 2023-12-04 12:20:31 +01:00
commit 86ac07f2f8
11 changed files with 141 additions and 32 deletions

View file

@ -63,6 +63,7 @@ void DoomLevelSubmesh::UpdateDynamic(FLevelLocals& doomMap, int lightmapStartInd
void DoomLevelSubmesh::Reset()
{
Surfaces.Clear();
WallPortals.Clear();
MeshVertices.Clear();
MeshElements.Clear();
MeshSurfaceIndexes.Clear();
@ -168,6 +169,11 @@ void DoomLevelSubmesh::CreateStaticSurfaces(FLevelLocals& doomMap)
surf.PipelineID = pipelineID;
Surfaces.Push(surf);
}
for (const HWWall& portal : result.portals)
{
WallPortals.Push(portal);
}
}
// Create surfaces for all flats