mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Fail hard on unrecoverable mistakes in GFXTextureArray
This commit is contained in:
parent
60a10f4334
commit
26f09d9a97
1 changed files with 2 additions and 2 deletions
|
|
@ -138,7 +138,7 @@ void GFXTextureArray::setTexture(const GFXTexHandle& texture, U32 slot)
|
||||||
GBitmap* inBitmap = TEXMGR->loadUncompressedTexture(texture->getPath(), &GFXTexturePersistentProfile, mWidth, mHeight);
|
GBitmap* inBitmap = TEXMGR->loadUncompressedTexture(texture->getPath(), &GFXTexturePersistentProfile, mWidth, mHeight);
|
||||||
if (!inBitmap->setFormat(mFormat))
|
if (!inBitmap->setFormat(mFormat))
|
||||||
{
|
{
|
||||||
AssertWarn(true, "GFXTextureArray::setTexture all textures must be convertible to GFXFormat " + mFormat);
|
AssertFatal(true, "GFXTextureArray::setTexture all textures must be convertible to GFXFormat " + mFormat);
|
||||||
Con::errorf("GFXTextureArray::setTexture all textures must be convertible to GFXFormat" + mFormat);
|
Con::errorf("GFXTextureArray::setTexture all textures must be convertible to GFXFormat" + mFormat);
|
||||||
handle = NULL;
|
handle = NULL;
|
||||||
delete inBitmap;
|
delete inBitmap;
|
||||||
|
|
@ -156,7 +156,7 @@ void GFXTextureArray::setTexture(const GFXTexHandle& texture, U32 slot)
|
||||||
|
|
||||||
if (handle.getHeight() != mHeight || handle.getWidth() != mWidth || handle.getFormat() != mFormat || handle->getMipLevels() < mMipLevels)
|
if (handle.getHeight() != mHeight || handle.getWidth() != mWidth || handle.getFormat() != mFormat || handle->getMipLevels() < mMipLevels)
|
||||||
{
|
{
|
||||||
AssertWarn(true, "GFXTextureArray::setTexture all textures must have the same size and format");
|
AssertFatal(true, "GFXTextureArray::setTexture all textures must have the same size and format");
|
||||||
Con::errorf("GFXTextureArray::setTexture all textures must have the same size and format");
|
Con::errorf("GFXTextureArray::setTexture all textures must have the same size and format");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue