Only update VBO lightmap if its a full update
This commit is contained in:
parent
3127e2598a
commit
5d3f16b0d6
1 changed files with 5 additions and 2 deletions
|
|
@ -346,14 +346,17 @@ void DoomLevelMesh::BeginFrame(FLevelLocals& doomMap)
|
|||
{
|
||||
CreateFlat(doomMap, flatIndex);
|
||||
}
|
||||
Flats[flatIndex].UpdateType = SurfaceUpdateType::None;
|
||||
}
|
||||
|
||||
PackLightmapAtlas();
|
||||
|
||||
for (int flatIndex : FlatUpdateList)
|
||||
{
|
||||
UpdateVBOLightmap(*screen->RenderState(), &doomMap.sectors[flatIndex]);
|
||||
if (Flats[flatIndex].UpdateType == SurfaceUpdateType::Full)
|
||||
{
|
||||
UpdateVBOLightmap(*screen->RenderState(), &doomMap.sectors[flatIndex]);
|
||||
}
|
||||
Flats[flatIndex].UpdateType = SurfaceUpdateType::None;
|
||||
}
|
||||
FlatUpdateList.Clear();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue