Show
Ignore:
Timestamp:
12/08/09 18:41:44 (4 years ago)
Author:
robert
Message:

From Ulrich Hertlein, "attached is a stencil buffer-based constant-width outline f/x with example. I've also modified osgfxbrowser to setup the stencil buffer accordingly."

Files:
1 modified

Legend:

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

    r7648 r10869  
    321321    viewer.setThreadingModel(threading); 
    322322 
     323    // setup stencil buffer for Outline f/x. 
     324    osg::DisplaySettings::instance()->setMinimumNumStencilBits(1); 
     325    unsigned int clearMask = viewer.getCamera()->getClearMask(); 
     326    viewer.getCamera()->setClearMask(clearMask | GL_STENCIL_BUFFER_BIT); 
     327    viewer.getCamera()->setClearStencil(0); 
     328  
    323329    // any option left unread are converted into errors to write out later. 
    324330    arguments.reportRemainingOptionsAsUnrecognized();