Added prelimarny support for reading archives via the .net plugin

This commit is contained in:
Robert Osfield
2004-11-13 16:21:48 +00:00
parent 06f1b602e7
commit ddb0d6bd4f
10 changed files with 75 additions and 17 deletions

View File

@@ -129,9 +129,11 @@ int main( int argc, char **argv )
itr!=files.end();
++itr)
{
std::cout<<"reading "<<*itr<<std::endl;
osg::ref_ptr<osg::Object> obj = osgDB::readObjectFile(*itr);
if (obj.valid())
{
std::cout<<" write to archive "<<*itr<<std::endl;
archive->writeObject(*obj, *itr);
}
}

View File

@@ -26,7 +26,10 @@ int main( int argc, char **argv )
arguments.getApplicationUsage()->setCommandLineUsage(arguments.getApplicationName()+" [options] filename ...");
arguments.getApplicationUsage()->addCommandLineOption("--image <filename>","Load an image and render it on a quad");
arguments.getApplicationUsage()->addCommandLineOption("--dem <filename>","Load an image/DEM and render it on a HeightField");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display this information");
arguments.getApplicationUsage()->addCommandLineOption("-h or --help","Display command line paramters");
arguments.getApplicationUsage()->addCommandLineOption("--help-env","Display environmental variables available");
arguments.getApplicationUsage()->addCommandLineOption("--help-keys","Display keyboard & mouse bindings available");
arguments.getApplicationUsage()->addCommandLineOption("--help-all","Display all command line, env vars and keyboard & mouse bindigs.");
// construct the viewer.
@@ -39,9 +42,13 @@ int main( int argc, char **argv )
viewer.getUsage(*arguments.getApplicationUsage());
// if user request help write it out to cout.
if (arguments.read("-h") || arguments.read("--help"))
bool helpAll = arguments.read("--help-all");
unsigned int helpType = ((helpAll || arguments.read("-h") || arguments.read("--help"))? osg::ApplicationUsage::COMMAND_LINE_OPTION : 0 ) |
((helpAll || arguments.read("--help-env"))? osg::ApplicationUsage::ENVIRONMENTAL_VARIABLE : 0 ) |
((helpAll || arguments.read("--help-keys"))? osg::ApplicationUsage::KEYBOARD_MOUSE_BINDING : 0 );
if (helpType)
{
arguments.getApplicationUsage()->write(std::cout);
arguments.getApplicationUsage()->write(std::cout, helpType);
return 1;
}