diff --git a/src/osgPlugins/nvtt/NVTTImageProcessor.cpp b/src/osgPlugins/nvtt/NVTTImageProcessor.cpp index 0fe95a2c8..5f88d77fb 100644 --- a/src/osgPlugins/nvtt/NVTTImageProcessor.cpp +++ b/src/osgPlugins/nvtt/NVTTImageProcessor.cpp @@ -185,7 +185,7 @@ void NVTTProcessor::convertRGBAToBGRA( std::vector& 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& 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) \ No newline at end of file +REGISTER_OSGIMAGEPROCESSOR(nvtt, NVTTProcessor)