Ignore:
Timestamp:
Sep 4, 2011, 9:13:25 PM (13 years ago)
Author:
Torben Dannhauer
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • experimental/distortionNG/main.cpp

    r313 r315  
    4141    // construct the viewer.
    4242    extViewer viewer(arguments);
     43        viewer.setUpViewForManualDistortion();
     44
    4345
    4446    // set up the camera manipulators.
     
    104106                        return 1;
    105107                }
     108                else
     109                        viewer.setSceneData( rootnode );
    106110    }
    107111
    108         osg::ref_ptr<osg::Geode> geode = new osg::Geode;
    109         geode->addDrawable( extViewer::createMesh(16, 9) );
    110         geode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
    111         geode->getOrCreateStateSet()->setAttributeAndModes( new osg::PolygonOffset(1.0f, 1.0f) );
     112        //osg::ref_ptr<osg::Geode> geode = new osg::Geode;
     113        //geode->addDrawable( extViewer::createMesh(16, 9) );
     114        //geode->getOrCreateStateSet()->setMode( GL_LIGHTING, osg::StateAttribute::OFF );
     115        //geode->getOrCreateStateSet()->setAttributeAndModes( new osg::PolygonOffset(1.0f, 1.0f) );
    112116
    113         osg::ref_ptr<distortionHandler> selector = new distortionHandler( viewer.getCamera() );
     117        //osg::ref_ptr<distortionHandler> selector = new distortionHandler( viewer.getCamera() );
    114118
    115         osg::ref_ptr<osg::Group> root = new osg::Group;
    116         root->addChild( geode.get() );
    117         root->addChild( selector->createVertexHighlighter() );
     119        //osg::ref_ptr<osg::Group> root = new osg::Group;
     120        //root->addChild( geode.get() );
     121        //root->addChild( selector->createVertexHighlighter() );
    118122
    119         viewer.addEventHandler( selector.get() );
    120         viewer.setSceneData( root.get() );
     123        //viewer.addEventHandler( selector.get() );
     124        //viewer.setSceneData( root.get() );
    121125
    122         // Avoid that the highlighter is culled away
    123         osg::CullSettings::CullingMode mode = viewer.getCamera()->getCullingMode();
    124         viewer.getCamera()->setCullingMode( mode & (~osg::CullSettings::SMALL_FEATURE_CULLING) );
     126        //// Avoid that the highlighter is culled away
     127        //osg::CullSettings::CullingMode mode = viewer.getCamera()->getCullingMode();
     128        //viewer.getCamera()->setCullingMode( mode & (~osg::CullSettings::SMALL_FEATURE_CULLING) );
    125129       
    126130        // run the viewers main loop
Note: See TracChangeset for help on using the changeset viewer.