Show
Ignore:
Timestamp:
01/20/09 13:39:26 (3 years ago)
Author:
robert
Message:

Added AlphaFunc? support into osgVolume::AlphaFuncProperty?.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgVolume/FixedFunctionTechnique.cpp

    r9504 r9511  
    184184    stateset->setMode(GL_LIGHTING,osg::StateAttribute::ON); 
    185185    stateset->setMode(GL_BLEND,osg::StateAttribute::ON); 
    186     stateset->setAttributeAndModes(new osg::AlphaFunc(osg::AlphaFunc::GREATER,alphaFuncValue), osg::StateAttribute::ON); 
     186     
     187    if (cpv._afProperty.valid()) 
     188    { 
     189        stateset->setAttributeAndModes(cpv._afProperty->getAlphaFunc(), osg::StateAttribute::ON); 
     190    } 
     191    else 
     192    { 
     193        stateset->setAttributeAndModes(new osg::AlphaFunc(osg::AlphaFunc::GREATER,alphaFuncValue), osg::StateAttribute::ON); 
     194    } 
    187195     
    188196    osg::Material* material = new osg::Material;