Optimize C++ compilation time

This commit is contained in:
Wojtek Figat
2021-04-30 16:27:57 +02:00
parent 05ba9b8d45
commit 0e75dba142
222 changed files with 1095 additions and 1506 deletions

View File

@@ -6,6 +6,7 @@
#include "Engine/Content/Content.h"
#include "Engine/Level/Level.h"
#include "Engine/Level/Scene/SceneLightmapsData.h"
#include "Engine/Graphics/Textures/GPUTexture.h"
#if USE_EDITOR
#include "Engine/ContentImporters/ImportTexture.h"
#include "Engine/ContentImporters/AssetsImportingManager.h"
@@ -136,6 +137,14 @@ void Lightmap::EnsureSize(int32 size)
}
}
bool Lightmap::IsReady() const
{
// TODO: link for events and cache this to be a boolean value
return _textures[0] && _textures[0]->GetTexture()->ResidentMipLevels() > 0
&& _textures[1] && _textures[1]->GetTexture()->ResidentMipLevels() > 0
&& _textures[2] && _textures[2]->GetTexture()->ResidentMipLevels() > 0;
}
#if USE_EDITOR
bool Lightmap::OnInitLightmap(TextureData& image)