From a727b74926b7197cd7cfdc61a55ce8e9f5407676 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 23 Feb 2011 12:13:43 +0000 Subject: [PATCH] Changed the default number of components for a RGB to 4 so it appears as an RGBA --- examples/osgvolume/osgvolume.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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."<