Permalink
Browse files

Removed old redundent TexGen usage.

  • Loading branch information...
1 parent 91f9715 commit bc4c3550407fc676aff8c1f30b9d8748ef83139c @osg-training-guest osg-training-guest committed Jan 16, 2014
Showing with 1 addition and 19 deletions.
  1. +0 −18 src/osgVolume/MultipassTechnique.cpp
  2. +1 −1 src/osgVolume/VolumeScene.cpp
View
18 src/osgVolume/MultipassTechnique.cpp
@@ -22,7 +22,6 @@
#include <osg/Program>
#include <osg/Material>
#include <osg/CullFace>
-#include <osg/TexGen>
#include <osg/Texture1D>
#include <osg/Texture2D>
#include <osg/Texture3D>
@@ -298,7 +297,6 @@ void MultipassTechnique::init()
osg::ref_ptr<osg::StateSet> stateset = new osg::StateSet;
_volumeRenderStateSet = stateset;
- unsigned int texgenTextureUnit = 0;
unsigned int volumeTextureUnit = 3;
// set up uniforms
@@ -342,22 +340,6 @@ void MultipassTechnique::init()
{
tf = dynamic_cast<osg::TransferFunction1D*>(cpv._tfProperty->getTransferFunction());
}
-
- osg::ref_ptr<osg::TexGen> texgen = new osg::TexGen;
- texgen->setMode(osg::TexGen::OBJECT_LINEAR);
- texgen->setPlanesFromMatrix( geometryMatrix * osg::Matrix::inverse(imageMatrix));
-
- if (masterLocator)
- {
- osg::ref_ptr<TexGenLocatorCallback> locatorCallback = new TexGenLocatorCallback(texgen, masterLocator, layerLocator);
- masterLocator->addCallback(locatorCallback.get());
- if (masterLocator != layerLocator)
- {
- if (layerLocator) layerLocator->addCallback(locatorCallback.get());
- }
- }
-
- stateset->setTextureAttributeAndModes(texgenTextureUnit, texgen.get(), osg::StateAttribute::ON | osg::StateAttribute::OVERRIDE );
}
View
2 src/osgVolume/VolumeScene.cpp
@@ -138,7 +138,7 @@ VolumeScene::TileData* VolumeScene::tileVisited(osgUtil::CullVisitor* cv, osgVol
tileData->stateset = new osg::StateSet;
tileData->stateset->setTextureAttribute(2, tileData->depthTexture.get());
- tileData->texgenUniform = new osg::Uniform("texgen2",osg::Matrixf());
+ tileData->texgenUniform = new osg::Uniform("texgen",osg::Matrixf());
tileData->stateset->addUniform(tileData->texgenUniform);
}

0 comments on commit bc4c355

Please sign in to comment.