diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index 35ccec0cf..333152bc7 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -491,6 +491,12 @@ osg::Image* createTexture3D(ImageList& imageList, ProcessRow& processRow, } } + if (max_components==3) + { + // change RGB to a RGBA + max_components = 4; + } + if (numComponentsDesired!=0) max_components = numComponentsDesired; GLenum desiredPixelFormat = 0; @@ -1081,7 +1087,7 @@ int main( int argc, char **argv ) while (arguments.read("--yMultiplier",yMultiplier)) { OSG_NOTICE<<"Warning: --yMultiplier option no longer supported."<