diff --git a/examples/osgvolume/osgvolume.cpp b/examples/osgvolume/osgvolume.cpp index 55303f70c..f714d9ba9 100644 --- a/examples/osgvolume/osgvolume.cpp +++ b/examples/osgvolume/osgvolume.cpp @@ -22,8 +22,6 @@ #include -const int maximumTextureSize = 256; - typedef std::vector< osg::ref_ptr > ImageList; struct PassThroughTransformFunction @@ -257,7 +255,11 @@ struct ProcessRow }; -osg::Image* createTexture3D(ImageList& imageList, ProcessRow& processRow, unsigned int numComponentsDesired=0) +osg::Image* createTexture3D(ImageList& imageList, ProcessRow& processRow, + unsigned int numComponentsDesired, + int s_maximumTextureSize, + int t_maximumTextureSize, + int r_maximumTextureSize ) { int max_s = 0; int max_t = 0; @@ -313,13 +315,13 @@ osg::Image* createTexture3D(ImageList& imageList, ProcessRow& processRow, unsign // compute nearest powers of two for each axis. int s_nearestPowerOfTwo = 1; - while(s_nearestPowerOfTwo image_3d; @@ -806,7 +822,7 @@ int main( int argc, char **argv ) // pack the textures into a single texture. ProcessRow processRow; - image_3d = createTexture3D(imageList, processRow); + image_3d = createTexture3D(imageList, processRow, 0, s_maximumTextureSize, t_maximumTextureSize, r_maximumTextureSize); }