- Timestamp:
- 09/21/07 11:02:03 (6 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/examples/osgstereoimage/osgstereoimage.cpp
r7228 r7446 46 46 texture->setFilter(osg::Texture2D::MIN_FILTER,osg::Texture2D::LINEAR); 47 47 texture->setFilter(osg::Texture2D::MAG_FILTER,osg::Texture2D::LINEAR); 48 texture->setWrap(osg::Texture2D::WRAP_S,osg::Texture2D::CLAMP_TO_BORDER); 49 texture->setWrap(osg::Texture2D::WRAP_T,osg::Texture2D::CLAMP_TO_BORDER); 48 50 texture->setResizeNonPowerOfTwoHint(false); 49 51 texture->setImage(image); … … 278 280 return true; 279 281 } 280 else if ( ea.getKey()=='n')282 else if ((ea.getKey()=='n') || (ea.getKey()==osgGA::GUIEventAdapter::KEY_Right)) 281 283 { 282 284 nextSlide(); 283 285 return true; 284 286 } 285 else if ( ea.getKey()=='p')287 else if ((ea.getKey()=='p') || (ea.getKey()==osgGA::GUIEventAdapter::KEY_Left)) 286 288 { 287 289 previousSlide(); 288 290 return true; 289 291 } 290 else if ( ea.getKey()=='w')292 else if ((ea.getKey()=='w') || (ea.getKey()==osgGA::GUIEventAdapter::KEY_KP_Add)) 291 293 { 292 294 scaleImage(0.99f); 293 295 return true; 294 296 } 295 else if ( ea.getKey()=='s')297 else if ((ea.getKey()=='s') || (ea.getKey()==osgGA::GUIEventAdapter::KEY_KP_Subtract)) 296 298 { 297 299 scaleImage(1.01f); … … 463 465 arguments.getApplicationUsage()->addCommandLineOption("-y <float>","Vertical offset of left and right images."); 464 466 arguments.getApplicationUsage()->addCommandLineOption("--disk","Keep images on disk"); 467 arguments.getApplicationUsage()->addCommandLineOption("-files <filename>","Load filenames from a file"); 465 468 arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information"); 466 469 arguments.getApplicationUsage()->addCommandLineOption("--SingleThreaded","Select SingleThreaded threading model for viewer."); … … 493 496 while (arguments.read("--disk")) { onDisk=true;} 494 497 498 std::string filename=""; 499 FileList fileList; 500 // extract the filenames from the a file, one filename per line. 501 while (arguments.read("-files",filename)) { 502 std::ifstream is(filename.c_str()); 503 if (is) { 504 std::string line; 505 while (std::getline(is,line,'\n')) fileList.push_back(line); 506 is.close(); 507 } 508 509 } 510 495 511 // if user request help write it out to cout. 496 512 if (arguments.read("-h") || arguments.read("--help")) … … 519 535 520 536 // extract the filenames from the arguments list. 521 FileList fileList;522 537 for(int pos=1;pos<arguments.argc();++pos) 523 538 {
