Show
Ignore:
Timestamp:
06/24/03 17:40:09 (11 years ago)
Author:
don
Message:

*** empty log message ***

Files:
1 modified

Legend:

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

    r1938 r1983  
    3636    osg::StateSet* stateset = geode->getOrCreateStateSet(); 
    3737    stateset->setMode(GL_LIGHTING,osg::StateAttribute::OFF); 
    38     //stateset->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF); 
     38 
     39#if 0 
     40    // to ensure the hud appears on top we can either use osg::Depth to force the  
     41    // depth fragments to be placed at the front of the screen. 
    3942    stateset->setAttribute(new osg::Depth(osg::Depth::LESS,0.0,0.0001)); 
     43#else 
     44    // or disable depth test, and make sure that the hud is drawn after everything  
     45    // else so that it always appears ontop. 
     46    stateset->setMode(GL_DEPTH_TEST,osg::StateAttribute::OFF); 
     47    stateset->setRenderBinDetails(11,"RenderBin"); 
     48#endif 
    4049 
    4150    osg::Vec3 position(150.0f,800.0f,0.0f);