Changeset 19932

Show
Ignore:
Timestamp:
04/09/07 22:01:07 (2 years ago)
Author:
patrick
Message:

When using Cocoa, it is not necessary to identify the configuration files
to load on the command line. One of the fun thinks (at least in my opinion)
about the way that I have put the Cocoa stuff together is that we can
leverage run-time reconfiguration of VR Juggler and load config files through
the application's built-in "File → Open…" menu item.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • juggler/trunk/modules/vrjuggler/samples/OpenSG/advanced/OpenSGViewer/app.cpp

    r19729 r19932  
    3333    OpenSGViewer* application = new OpenSGViewer(kernel); 
    3434 
    35     if (argc <= 2) 
     35#if ! defined(VRJ_USE_COCOA) 
     36    if ( argc <= 2 ) 
    3637    { 
    3738      std::cout << "\n\nUsage: " << argv[0] << " modelname vjconfigfile[0] vjconfigfile[1] ... vjconfigfile[n]\n" << std::flush; 
    3839      exit(1); 
    3940    } 
     41#endif 
    4042 
    4143    application->setModelFileName(std::string(argv[1])); 
    4244 
    4345    // Load any config files specified on the command line 
    44     for(int i=2;i<argc;i++) 
     46    for ( int i = 2; i < argc; ++i ) 
     47    { 
    4548        kernel->loadConfigFile(argv[i]); 
    46      
     49    } 
     50 
    4751    kernel->start(); 
    4852    kernel->setApplication(application); 
  • juggler/trunk/modules/vrjuggler/samples/OpenSG/simple/OpenSGNav/app.cpp

    r19729 r19932  
    3434   OpenSGNav* application = new OpenSGNav(kernel); 
    3535 
    36    if (argc <= 2) 
     36#if ! defined(VRJ_USE_COCOA) 
     37   if ( argc <= 2 ) 
    3738   { 
    3839      std::cout << "\n\nUsage: " << argv[0] 
     
    4142      exit(1); 
    4243   } 
     44#endif 
    4345 
    4446   application->setModelFileName(std::string(argv[1]));