Graphics/Material: Add errors when failed to query texture
Former-commit-id: b848a6552b442edf87260bbbb6b3703bf155a4b7 [formerly b4720a11771bd5f2e61f54afc69c361b7c412555] Former-commit-id: b3aa1119d7ca9efe3030f40f1f5d1f0c79b416fd
This commit is contained in:
@@ -289,7 +289,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get alpha map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetAlphaMap(std::move(texture));
|
||||
@@ -335,7 +338,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get diffuse map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetDiffuseMap(std::move(texture));
|
||||
@@ -366,7 +372,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get emissive map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetEmissiveMap(std::move(texture));
|
||||
@@ -397,7 +406,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get height map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetHeightMap(std::move(texture));
|
||||
@@ -418,7 +430,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get normal map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetNormalMap(std::move(texture));
|
||||
@@ -471,7 +486,10 @@ namespace Nz
|
||||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get specular map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetSpecularMap(std::move(texture));
|
||||
|
||||
Reference in New Issue
Block a user