Cleaned up DXT1 support

This commit is contained in:
Robert Osfield
2011-04-14 15:22:43 +00:00
parent 5fb7f69108
commit 2648723c83
3 changed files with 11 additions and 16 deletions

View File

@@ -633,18 +633,7 @@ void Image::setInternalTextureFormat(GLint internalFormat)
void Image::setPixelFormat(GLenum pixelFormat)
{
if (_pixelFormat==pixelFormat) return; // do nothing if the same.
if (_pixelFormat==0 || computeNumComponents(_pixelFormat)==computeNumComponents(pixelFormat))
{
// if the two formats have the same number of componets then
// we can do a straight swap.
_pixelFormat = pixelFormat;
}
else
{
OSG_WARN<<"Image::setPixelFormat(..) - warning, attempt to reset the pixel format with a different number of components."<<std::endl;
}
_pixelFormat = pixelFormat;
}
void Image::setDataType(GLenum dataType)
@@ -1256,6 +1245,7 @@ bool Image::isImageTranslucent() const
case(GL_BGR):
return false;
case(GL_COMPRESSED_RGB_S3TC_DXT1_EXT):
return false;
case(GL_COMPRESSED_RGBA_S3TC_DXT1_EXT):
case(GL_COMPRESSED_RGBA_S3TC_DXT3_EXT):
case(GL_COMPRESSED_RGBA_S3TC_DXT5_EXT):