- Timestamp:
- 07/21/08 17:05:08 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmultitexturecontrol/osgmultitexturecontrol.cpp
r8610 r8639 237 237 // use an ArgumentParser object to manage the program arguments. 238 238 osg::ArgumentParser arguments(&argc,argv); 239 arguments.getApplicationUsage()->addCommandLineOption("-v","Set the terrain vertical scale."); 240 arguments.getApplicationUsage()->addCommandLineOption("-r","Set the terrain sample ratio."); 241 arguments.getApplicationUsage()->addCommandLineOption("--login <url> <username> <password>","Provide authentication information for http file access."); 239 242 240 243 // construct the viewer. … … 247 250 while(arguments.read("-r",sampleRatio)) {} 248 251 252 std::string url, username, password; 253 while(arguments.read("--login",url, username, password)) 254 { 255 if (!osgDB::Registry::instance()->getAuthenticationMap()) 256 { 257 osgDB::Registry::instance()->setAuthenticationMap(new osgDB::AuthenticationMap); 258 osgDB::Registry::instance()->getAuthenticationMap()->addAuthenticationDetails( 259 url, 260 new osgDB::AuthenticationDetails(username, password) 261 ); 262 } 263 } 249 264 250 265 // add all the event handlers to the viewer … … 364 379 } 365 380 381 382 366 383 // create the windows and run the threads. 367 384 viewer.realize();
