aug GFXTextureArray::setTexture to report what texture sizes are mismatching

This commit is contained in:
AzaezelX 2022-09-18 05:36:11 -05:00
parent 391b656e2c
commit 62a99adb74

View file

@ -123,13 +123,13 @@ void GFXTextureArray::setTexture(const GFXTexHandle& texture, U32 slot)
{
if (texture.getHeight() != mHeight || texture.getWidth() != mWidth)
{
AssertWarn(true, "GFXTextureArray::setTexture all textures should be the same size");
Con::warnf("GFXTextureArray::setTexture all textures should be the same size");
AssertWarn(true, avar("GFXTextureArray::setTexture all textures should be the same size: %i vs %i", texture.getHeight(), mHeight));
Con::warnf(avar("GFXTextureArray::setTexture all textures should be the same size: %i vs %i", texture.getHeight(), mHeight));
}
else if (texture->getMipLevels() < mMipLevels)
{
AssertWarn(true, "GFXTextureArray::setTexture all textures should have at least the same number of mips");
Con::warnf("GFXTextureArray::setTexture all textures should have at least the same number of mips");
AssertWarn(true, avar("GFXTextureArray::setTexture all textures should have at least the same number of mips: %i vs %i", texture->getMipLevels(), mMipLevels));
Con::warnf(avar("GFXTextureArray::setTexture all textures should have at least the same number of mips: %i vs %i", texture->getMipLevels(), mMipLevels));
}
else
{