Show
Ignore:
Timestamp:
03/25/08 12:50:28 (6 years ago)
Author:
robert
Message:

From Wojciech Leandowski, "I removed few lines of code that were setting Threading mode and Screen mode. I believe they are now not neccessary because the same does osgViewer::Viewer argument parser. In fact argument list does not contain these args after they were parsed by osgViewer::Viewer constructor.


I also allowed myself to add ThreadingHandler? to the example."

Files:
1 modified

Legend:

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

    r7957 r7990  
    515515    arguments.getApplicationUsage()->addCommandLineOption("--two-pass", "Use two-pass stencil for shadow volumes."); 
    516516 
    517  
    518517    // construct the viewer. 
    519518    osgViewer::Viewer viewer(arguments); 
     
    525524        return 1; 
    526525    } 
    527  
    528     // default to single threaded during dev work. 
    529     viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); 
    530  
    531     while (arguments.read("--SingleThreaded")) viewer.setThreadingModel(osgViewer::Viewer::SingleThreaded); 
    532     while (arguments.read("--CullDrawThreadPerContext")) viewer.setThreadingModel(osgViewer::Viewer::CullDrawThreadPerContext); 
    533     while (arguments.read("--DrawThreadPerContext")) viewer.setThreadingModel(osgViewer::Viewer::DrawThreadPerContext); 
    534     while (arguments.read("--CullThreadPerCameraDrawThreadPerContext")) viewer.setThreadingModel(osgViewer::Viewer::CullThreadPerCameraDrawThreadPerContext); 
    535  
    536526 
    537527    bool postionalLight = true; 
     
    541531    bool updateLightPosition = true; 
    542532    while (arguments.read("--noUpdate")) updateLightPosition = false; 
    543  
    544  
    545     int screenNum = -1; 
    546     while (arguments.read("--screen", screenNum)) viewer.setUpViewOnSingleScreen(screenNum); 
    547533 
    548534    // set up the camera manipulators. 
     
    581567    viewer.addEventHandler(new osgViewer::RecordCameraPathHandler); 
    582568 
     569    // add the threading handler 
     570    viewer.addEventHandler( new osgViewer::ThreadingHandler() ); 
    583571 
    584572    osg::ref_ptr<osgShadow::ShadowedScene> shadowedScene = new osgShadow::ShadowedScene; 
     
    586574    shadowedScene->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask); 
    587575    shadowedScene->setCastsShadowTraversalMask(CastsShadowTraversalMask); 
    588  
    589576 
    590577    if (arguments.read("--sv"))