From Brad Christiansen, "fix for the NVTTImageProcessor. When the code was updated in revision 12912 a couple of typos where made. These cause a crash when compressing transparent images and mangled colours when compressing rgb images. "
This commit is contained in:
parent
30c35cb407
commit
568aeef975
@ -185,7 +185,7 @@ void NVTTProcessor::convertRGBAToBGRA( std::vector<unsigned char>& outputData, c
|
||||
{
|
||||
outputData[n] = data[column*4+2];
|
||||
outputData[n+1] = data[column*4+1];
|
||||
outputData[n+2] = data[column*4+n];
|
||||
outputData[n+2] = data[column*4];
|
||||
outputData[n+3] = data[column*4+3];
|
||||
n+=4;
|
||||
}
|
||||
@ -203,7 +203,7 @@ void NVTTProcessor::convertRGBToBGRA( std::vector<unsigned char>& outputData, co
|
||||
{
|
||||
outputData[n] = data[column*3+2];
|
||||
outputData[n+1] = data[column*3+1];
|
||||
outputData[n+2] = data[column*3+n];
|
||||
outputData[n+2] = data[column*3];
|
||||
outputData[n+3] = 255;
|
||||
n+=4;
|
||||
}
|
||||
@ -343,4 +343,4 @@ void NVTTProcessor::generateMipMap(osg::Image& image, bool resizeToPowerOfTwo, C
|
||||
process( image, nvtt::Format_RGBA, true, resizeToPowerOfTwo, method, NORMAL);
|
||||
}
|
||||
|
||||
REGISTER_OSGIMAGEPROCESSOR(nvtt, NVTTProcessor)
|
||||
REGISTER_OSGIMAGEPROCESSOR(nvtt, NVTTProcessor)
|
||||
|
Loading…
Reference in New Issue
Block a user