Ignore:
Timestamp:
Oct 17, 2010, 8:32:03 PM (14 years ago)
Author:
Torben Dannhauer
Message:

Silverlining integration updated on the road to Silverlining 2.0 compatibility

File:
1 edited

Legend:

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

    r133 r134  
    8585        viewer->realize();
    8686
    87         // setup scenery
    88         setupScenery();
    89 
    9087        // parse Configuration file
    9188        parseConfigFile(arguments);
     
    10097void visual_core::mainLoop()
    10198{
     99        int framestoScenerySetup = 5;
    102100        // run main loop
    103101        while( !viewer->done() )
    104102    {
     103                // setup scenery
     104                if(framestoScenerySetup-- == 0)
     105                        setupScenery();
     106
    105107                // next frame please....
    106108        viewer->advance();
     
    408410void visual_core::setupScenery()
    409411{
    410         // iterate manually through one frame to allow some modules like Sky_Silverlining to initialize properly before we configure it according to the scenery data.
    411         viewer->advance();
    412         viewer->eventTraversal();
    413         viewer->updateTraversal();
    414         viewer->renderingTraversals();
    415412
    416413        // Sky settings:       
     
    423420        //sky->addCloudLayer( 2, 50000, 50000, 600.0, 7351.0, 0.2, CIRROCUMULUS );
    424421        //sky->addCloudLayer( 3, 100000, 100000, 1300.0, 100.0, 0.07, CUMULUS_CONGESTUS );
    425         sky->addCloudLayer( 1, 10000, 10000, 600.0, 1000.0, 0.90, STRATOCUMULUS );
     422        sky->addCloudLayer( 1, 10000, 10000, 600.0, 2000.0, 0.90, STRATOCUMULUS );
    426423        //cloudLayerSlots[1].cloudLayerPointer->SetPrecipitation(SilverLining::CloudLayer::SLEET, 25.0 );
    427424
Note: See TracChangeset for help on using the changeset viewer.