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,7 +289,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get alpha map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetAlphaMap(std::move(texture));
|
SetAlphaMap(std::move(texture));
|
||||||
|
|
@ -335,7 +338,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get diffuse map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetDiffuseMap(std::move(texture));
|
SetDiffuseMap(std::move(texture));
|
||||||
|
|
@ -366,7 +372,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get emissive map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetEmissiveMap(std::move(texture));
|
SetEmissiveMap(std::move(texture));
|
||||||
|
|
@ -397,7 +406,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get height map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetHeightMap(std::move(texture));
|
SetHeightMap(std::move(texture));
|
||||||
|
|
@ -418,7 +430,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get normal map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetNormalMap(std::move(texture));
|
SetNormalMap(std::move(texture));
|
||||||
|
|
@ -471,7 +486,10 @@ namespace Nz
|
||||||
{
|
{
|
||||||
texture = TextureManager::Get(textureName);
|
texture = TextureManager::Get(textureName);
|
||||||
if (!texture)
|
if (!texture)
|
||||||
|
{
|
||||||
|
NazaraError("Failed to get specular map \"" + textureName + "\"");
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
SetSpecularMap(std::move(texture));
|
SetSpecularMap(std::move(texture));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue