Optimize various debug views performance

This commit is contained in:
Wojtek Figat
2022-12-03 12:23:39 +01:00
parent 950289db9f
commit df45ac46b1
10 changed files with 78 additions and 61 deletions

View File

@@ -722,6 +722,7 @@ bool Model::Init(const Span<int32>& meshesCountPerLod)
{
auto& lod = LODs[lodIndex];
lod._model = this;
lod._lodIndex = lodIndex;
lod.ScreenSize = 1.0f;
const int32 meshesCount = meshesCountPerLod[lodIndex];
if (meshesCount <= 0 || meshesCount > MODEL_MAX_MESHES)
@@ -922,6 +923,7 @@ Asset::LoadResult Model::load()
{
auto& lod = LODs[lodIndex];
lod._model = this;
lod._lodIndex = lodIndex;
// Screen Size
stream->ReadFloat(&lod.ScreenSize);