Merged fixes to the texture compression settings from svn/trunk that don't change the

requested compression type when the pixel type is not a direct match.
This commit is contained in:
Robert Osfield
2009-03-26 10:25:50 +00:00
parent 8631eaaf40
commit 4ff8df73bc

View File

@@ -603,7 +603,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
switch(image.getPixelFormat())
{
case(3):
case(GL_RGB): internalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
case(GL_RGB): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
case(4):
case(GL_RGBA): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT3_EXT; break;
default: internalFormat = image.getInternalTextureFormat(); break;
@@ -618,7 +618,7 @@ void Texture::computeInternalFormatWithImage(const osg::Image& image) const
switch(image.getPixelFormat())
{
case(3):
case(GL_RGB): internalFormat = GL_COMPRESSED_RGB_S3TC_DXT1_EXT; break;
case(GL_RGB): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
case(4):
case(GL_RGBA): internalFormat = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT; break;
default: internalFormat = image.getInternalTextureFormat(); break;