From Colin McDonald, fixed image size calculation in getTotalSizeInBytesIncludingMipmaps(),

added checks on success of opening files for writing in the .ive plugin.
This commit is contained in:
Robert Osfield
2005-11-08 13:51:28 +00:00
parent 857b3e03c3
commit 6ed9cb40cc
3 changed files with 11 additions and 4 deletions

View File

@@ -308,9 +308,11 @@ unsigned int Image::getTotalSizeInBytesIncludingMipmaps() const
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
sizeOfLastMipMap = maximum(sizeOfLastMipMap, 8u); // block size of 8
break;
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):
sizeOfLastMipMap = maximum(sizeOfLastMipMap, 16u); // block size of 16
break;
default: break;
}