Add support for multiple meshes (DoomLevelSubmesh)

This commit is contained in:
Magnus Norddahl 2023-09-25 23:28:49 +02:00
commit 65929d021f
8 changed files with 292 additions and 347 deletions

View file

@ -480,9 +480,9 @@ void VulkanRenderDevice::BeginFrame()
levelMeshChanged = false;
mRaytrace->SetLevelMesh(levelMesh);
if (levelMesh && levelMesh->GetSurfaceCount() > 0)
if (levelMesh && levelMesh->StaticMesh->GetSurfaceCount() > 0)
{
GetTextureManager()->CreateLightmap(levelMesh->LMTextureSize, levelMesh->LMTextureCount, std::move(levelMesh->LMTextureData));
GetTextureManager()->CreateLightmap(levelMesh->StaticMesh->LMTextureSize, levelMesh->StaticMesh->LMTextureCount, std::move(levelMesh->StaticMesh->LMTextureData));
GetLightmap()->SetLevelMesh(levelMesh);
}
}