Changeset 308 for experimental/distortionNG/main.cpp
- Timestamp:
- Jul 26, 2011, 8:12:25 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experimental/distortionNG/main.cpp
r307 r308 88 88 viewer.addEventHandler(new osgViewer::ScreenCaptureHandler); 89 89 90 91 // obtain the vertical scale92 float verticalScale = 1.0f;93 while(arguments.read("-v",verticalScale)) {}94 95 // obtain the sample ratio96 float sampleRatio = 1.0f;97 while(arguments.read("-r",sampleRatio)) {}98 99 90 // load the nodes from the commandline arguments. 100 91 osg::Node* rootnode = osgDB::readNodeFiles(arguments); … … 102 93 if (!rootnode) 103 94 { 104 osg::notify(osg:: NOTICE)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl;95 osg::notify(osg::WARN)<<"Warning: no valid data loaded, please specify a database on the command line."<<std::endl; 105 96 return 1; 106 97 } 107 98 108 terrain->setSampleRatio(sampleRatio);109 terrain->setVerticalScale(verticalScale);110 terrain->setBlendingPolicy(blendingPolicy);111 //osg::ref_ptr<osgTerrain::TerrainTechnique> myT = new osgTerrain::myTerrainTechnique();112 //terrain->setTerrainTechniquePrototype( myT );113 114 115 // Use Tile load Callback116 osg::ref_ptr<osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique> > tlcb = new osgTerrain::GeometryTechniquePrototypeWorkaroundTLC<osgTerrain::myTerrainTechnique>();117 osgTerrain::TerrainTile::setTileLoadedCallback(tlcb);118 119 // register our custom handler for adjust Terrain settings120 viewer.addEventHandler(new TerrainHandler(terrain));121 99 122 100 // add a viewport to the viewer and attach the scene graph.
Note: See TracChangeset
for help on using the changeset viewer.