Graphics/Material: Add errors when failed to query texture
Former-commit-id: a28cd9537b7155f461a0e0dc761225c5e8758c77 [formerly e9c6cf2e48766eb3ef99c4711567d4da2e4e30ce] Former-commit-id: d00448a69f391c0e9b17fcce85e48f968b0de143
This commit is contained in:
parent
18eab1045d
commit
2ace255d17
|
|
@ -289,8 +289,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get alpha map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetAlphaMap(std::move(texture));
|
||||
return true;
|
||||
|
|
@ -335,8 +338,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get diffuse map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetDiffuseMap(std::move(texture));
|
||||
return true;
|
||||
|
|
@ -366,8 +372,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get emissive map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetEmissiveMap(std::move(texture));
|
||||
return true;
|
||||
|
|
@ -397,8 +406,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get height map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetHeightMap(std::move(texture));
|
||||
return true;
|
||||
|
|
@ -418,8 +430,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get normal map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetNormalMap(std::move(texture));
|
||||
return true;
|
||||
|
|
@ -471,8 +486,11 @@ namespace Nz
|
|||
{
|
||||
texture = TextureManager::Get(textureName);
|
||||
if (!texture)
|
||||
{
|
||||
NazaraError("Failed to get specular map \"" + textureName + "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
SetSpecularMap(std::move(texture));
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Reference in New Issue