Added support for "--output filename.osg" command line option to avoid debugging of generated presentations
This commit is contained in:
parent
d28b052fb7
commit
13a7ecebde
@ -576,6 +576,10 @@ int main( int argc, char **argv )
|
||||
osg::DisplaySettings::instance()->setScreenWidth(width);
|
||||
}
|
||||
|
||||
std::string outputFileName;
|
||||
while(arguments.read("--output",outputFileName)) {}
|
||||
|
||||
|
||||
// get details on keyboard and mouse bindings used by the viewer.
|
||||
viewer.getUsage(*arguments.getApplicationUsage());
|
||||
|
||||
@ -780,7 +784,11 @@ int main( int argc, char **argv )
|
||||
|
||||
seh->home();
|
||||
|
||||
// osgDB::writeNodeFile(*loadedModel,"saved.osg");
|
||||
if (!outputFileName.empty())
|
||||
{
|
||||
osgDB::writeNodeFile(*loadedModel,outputFileName);
|
||||
return 0;
|
||||
}
|
||||
|
||||
osg::Timer_t startOfFrameTick = osg::Timer::instance()->tick();
|
||||
double targetFrameTime = 1.0/targetFrameRate;
|
||||
|
Loading…
Reference in New Issue
Block a user