From 0f209a5362ff85724a62565d6b79f165c1b185aa Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 5 Jul 2006 13:44:07 +0000 Subject: [PATCH] From Eric Sokolowsky, "There is code in Image.cpp that calculates the size of a compressed image based on the internal format. There is similar code in the Texture class but it does not account for the ARB types. I modified the Texture class implementation to show a warning when an incomplete internal format is used to calculate the image size." --- src/osg/Texture.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/osg/Texture.cpp b/src/osg/Texture.cpp index e58e550ed..04f84efd1 100644 --- a/src/osg/Texture.cpp +++ b/src/osg/Texture.cpp @@ -623,8 +623,13 @@ void Texture::getCompressedSize(GLenum internalFormat, GLint width, GLint height { if (internalFormat == GL_COMPRESSED_RGB_S3TC_DXT1_EXT || internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT1_EXT) blockSize = 8; - else + else if (internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT3_EXT || internalFormat == GL_COMPRESSED_RGBA_S3TC_DXT5_EXT) blockSize = 16; + else + { + notify(WARN)<<"Texture::getCompressedSize(...) : cannot compute correct size of compressed format ("<