Show
Ignore:
Timestamp:
09/26/05 13:24:14 (9 years ago)
Author:
robert
Message:

Added TexEnv? DECAL mode.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osgspheresegment/osgspheresegment.cpp

    r4525 r4539  
    175175         
    176176        geom->setVertexArray(vertices); 
     177 
     178        osg::Vec4ubArray& color = *(new osg::Vec4ubArray(1)); 
     179        color[0].set(0,0,0,255); 
     180        geom->setColorArray(&color); 
     181        geom->setColorBinding(osg::Geometry::BIND_OVERALL); 
     182 
    177183        geom->addPrimitiveSet(new osg::DrawArrays(GL_LINES,0,vertices->getNumElements()));  
     184 
     185        geom->getOrCreateStateSet()->setMode(GL_LIGHTING,osg::StateAttribute::OFF); 
    178186 
    179187        osg::Geode* geode = new osg::Geode; 
     
    366374 
    367375    osgSim::OverlayNode* overlayNode = new osgSim::OverlayNode; 
     376     
     377    overlayNode->getOrCreateStateSet()->setTextureAttribute(1, new osg::TexEnv(osg::TexEnv::DECAL)); 
    368378 
    369379    const osg::BoundingSphere& bs = terrainGeode->getBound();