- Timestamp:
- 11/11/08 18:29:48 (5 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgmemorytest/osgmemorytest.cpp
r9146 r9147 317 317 arguments.getApplicationUsage()->setDescription(arguments.getApplicationName()+" tests OpenGL and Windowing memory scalability.."); 318 318 arguments.getApplicationUsage()->addCommandLineOption("-h or --help","List command line options."); 319 arguments.getApplicationUsage()->addCommandLineOption("--pbuffer","Create a 512x512 pixel buffer."); 319 320 arguments.getApplicationUsage()->addCommandLineOption("--pbuffer <width> <height>","Create a pixel buffer of specified dimensions."); 320 arguments.getApplicationUsage()->addCommandLineOption("-- pbuffer","Create a 512x512 pixel buffer.");321 arguments.getApplicationUsage()->addCommandLineOption("--window","Create a 512x512 graphics window."); 321 322 arguments.getApplicationUsage()->addCommandLineOption("--window <width> <height>","Create a graphics window of specified dimensions."); 322 arguments.getApplicationUsage()->addCommandLineOption("--window","Create a 512x512 graphics window.");323 323 arguments.getApplicationUsage()->addCommandLineOption("--delay <micoseconds>","Set a delay in microseconds before all OpenGL object operations."); 324 324 arguments.getApplicationUsage()->addCommandLineOption("--texture <width> <height> <depth>","Allocate a 3D texture of specified dimensions."); … … 337 337 return 1; 338 338 } 339 340 // report any errors if they have occurred when parsing the program arguments. 341 if (arguments.errors()) 342 { 343 arguments.writeErrorMessages(std::cout); 344 return 1; 345 } 346 339 347 340 if (arguments.argc()<=1) 348 341 { … … 391 384 while(arguments.read("-g",maxNumGLIterations)) {} 392 385 393 386 #if 0 394 387 // any option left unread are converted into errors to write out later. 395 388 arguments.reportRemainingOptionsAsUnrecognized(); … … 401 394 return 1; 402 395 } 396 #endif 403 397 404 398 typedef std::list< osg::ref_ptr<osg::GraphicsContext> > Contexts; … … 406 400 Contexts allocatedContexts; 407 401 GLObjects glObjects; 402 403 if (contextTests.empty()) 404 { 405 if (glMemoryTests.empty()) 406 { 407 std::cout<<"Not tests specified, please specify test using the command line options below."<<std::endl<<std::endl; 408 409 arguments.getApplicationUsage()->write(std::cout,osg::ApplicationUsage::COMMAND_LINE_OPTION); 410 return 1; 411 } 412 else 413 { 414 contextTests.push_back(new ContextTest(512,512, false)); 415 } 416 } 408 417 409 418 osg::Timer_t startTick = osg::Timer::instance()->tick();
