Improved error message
Former-commit-id: 8f21e6420859cac4153941cf35e34f0d4ba13c87
This commit is contained in:
parent
b871688c87
commit
8ff32e2376
|
|
@ -239,10 +239,19 @@ NzTexture* NzSkyboxBackground::GetTexture() const
|
||||||
void NzSkyboxBackground::SetTexture(NzTexture* cubemapTexture)
|
void NzSkyboxBackground::SetTexture(NzTexture* cubemapTexture)
|
||||||
{
|
{
|
||||||
#if NAZARA_GRAPHICS_SAFE
|
#if NAZARA_GRAPHICS_SAFE
|
||||||
if (cubemapTexture && !cubemapTexture->IsCubemap())
|
if (cubemapTexture)
|
||||||
{
|
{
|
||||||
NazaraError("Texture must be a cubemap");
|
if (!cubemapTexture->IsValid())
|
||||||
return;
|
{
|
||||||
|
NazaraError("Texture must be valid");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!cubemapTexture->IsCubemap())
|
||||||
|
{
|
||||||
|
NazaraError("Texture must be a cubemap");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue