Show
Ignore:
Timestamp:
03/21/07 17:34:04 (8 years ago)
Author:
robert
Message:

Added GeometryTechinque? to osgTerrain. Added usage of GeometryTechnique? into osgterrain example

Added --width and --height command line options to osgdistortion to allow users
to control the window size.

Files:
1 modified

Legend:

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

    r6301 r6385  
    171171} 
    172172 
    173 void setDomeFaces(osgViewer::Viewer& viewer, osg::ArgumentParser& /*arguments*/) 
     173void setDomeFaces(osgViewer::Viewer& viewer, osg::ArgumentParser& arguments) 
    174174{ 
    175175  
     
    183183    unsigned int width, height; 
    184184    wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); 
     185 
     186    while (arguments.read("--width",width)) {} 
     187    while (arguments.read("--height",height)) {} 
    185188 
    186189    osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; 
     
    436439    wsi->getScreenResolution(osg::GraphicsContext::ScreenIdentifier(0), width, height); 
    437440 
     441    while (arguments.read("--width",width)) {} 
     442    while (arguments.read("--height",height)) {} 
     443 
    438444    osg::ref_ptr<osg::GraphicsContext::Traits> traits = new osg::GraphicsContext::Traits; 
    439445    traits->x = 0; 
     
    444450    traits->doubleBuffer = true; 
    445451    traits->sharedContext = 0; 
     452     
     453     
    446454 
    447455    osg::ref_ptr<osg::GraphicsContext> gc = osg::GraphicsContext::createGraphicsContext(traits.get()); 
     
    657665    { 
    658666        osg::Node* distortionNode = createDistortionSubgraph( osgDB::readNodeFiles(arguments), viewer.getCamera()->getClearColor()); 
     667        viewer.setSceneData( distortionNode ); 
    659668    } 
    660669