@@ -103,7 +103,7 @@ void Lightmap::EnsureSize(int32 size)
|
||||
#if COMPILE_WITH_ASSETS_IMPORTER
|
||||
|
||||
Guid id = Guid::New();
|
||||
LOG(Info, "Cannot load lightmap {0} ({1}:{2}). Creating new one.", id, _index, textureIndex);
|
||||
LOG(Info, "Cannot load lightmap ({1}:{2}). Creating new one with ID={0}.", id, _index, textureIndex);
|
||||
String assetPath;
|
||||
_manager->GetCachedLightmapPath(&assetPath, _index, textureIndex);
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
/// Gets attached texture objects
|
||||
/// </summary>
|
||||
/// <param name="lightmaps">Lightmaps textures array</param>
|
||||
void GetTextures(GPUTexture* lightmaps[]) const
|
||||
void GetTextures(GPUTexture* lightmaps[3]) const
|
||||
{
|
||||
lightmaps[0] = _textures[0] ? _textures[0]->GetTexture() : nullptr;
|
||||
lightmaps[1] = _textures[1] ? _textures[1]->GetTexture() : nullptr;
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
/// Gets attached texture objects
|
||||
/// </summary>
|
||||
/// <param name="lightmaps">Lightmaps textures array</param>
|
||||
void GetTextures(Texture* lightmaps[]) const
|
||||
void GetTextures(Texture* lightmaps[3]) const
|
||||
{
|
||||
lightmaps[0] = _textures[0].Get();
|
||||
lightmaps[1] = _textures[1].Get();
|
||||
|
||||
@@ -152,7 +152,7 @@ void ShadowsOfMordor::Builder::updateLightmaps()
|
||||
{
|
||||
auto texture = textures[textureIndex];
|
||||
GPUDevice::Instance->Locker.Unlock();
|
||||
if (texture->WaitForLoaded())
|
||||
if (!texture || texture->WaitForLoaded())
|
||||
{
|
||||
LOG(Error, "Lightmap load failed.");
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user