Changeset 71 for osgVisual/src


Ignore:
Timestamp:
Jul 20, 2010, 9:33:09 PM (14 years ago)
Author:
Torben Dannhauer
Message:

further cleanup in initializing distortion and sky_silverlining

File:
1 edited

Legend:

Unmodified
Added
Removed
  • osgVisual/src/core/visual_core.cpp

    r70 r71  
    6565        viewer->setSceneData( rootNode );
    6666
     67        osg::Group* distortedSceneGraph = NULL;
    6768#ifdef USE_DISTORTION
    6869        // Initialize distortion
     70        OSG_NOTIFY( osg::ALWAYS ) << "Using distortion." << std::endl;
    6971        distortion = new visual_distortion( viewer, arguments );
    7072        distortion->initialize( rootNode, viewer->getCamera()->getClearColor() );
     73        distortedSceneGraph = distortion->getDistortedSceneGraph();
    7174#endif
    7275
    7376#ifdef USE_SKY_SILVERLINING
    7477        // Initialize sky
     78        OSG_NOTIFY( osg::ALWAYS ) << "Using Sky without distortion." << std::endl;
    7579        sky = new visual_skySilverLining( viewer );
    76         #ifdef USE_DISTORTION
    77                 if ( distortion.valid() )
    78                 {
    79                         OSG_NOTIFY( osg::ALWAYS ) << "Using sky with distortion." << std::endl;
    80                         sky->init( distortion->getDistortedSceneGraph(), rootNode);
    81                 }
    82         #else
    83                 OSG_NOTIFY( osg::ALWAYS ) << "Using Sky without distortion." << std::endl;
    84                 sky->init(NULL, rootNode);
    85         #endif
     80        sky->init(distortedSceneGraph, rootNode);
    8681#endif
    8782
Note: See TracChangeset for help on using the changeset viewer.