From: Mathias Froehlich Date: Sun, 4 Mar 2012 19:31:14 +0000 (+0100) Subject: fgviewer: Make use of the world texture when no file argument is given. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=daf3fbcd67846e26dc70d5a7d94ed5750c12fa91;p=flightgear.git fgviewer: Make use of the world texture when no file argument is given. --- diff --git a/utils/fgviewer/fgviewer.cxx b/utils/fgviewer/fgviewer.cxx index 515b41f2e..f719b70a6 100644 --- a/utils/fgviewer/fgviewer.cxx +++ b/utils/fgviewer/fgviewer.cxx @@ -189,9 +189,15 @@ main(int argc, char** argv) arguments.reportRemainingOptionsAsUnrecognized(); arguments.writeErrorMessages(std::cerr); - // read the scene from the list of file specified command line args. osg::ref_ptr loadedModel; - loadedModel = osgDB::readNodeFiles(arguments, options.get()); + if (arguments.argc() != 1) { + // read the scene from the list of file specified command line args. + loadedModel = osgDB::readNodeFiles(arguments, options.get()); + } else { + // if no arguments given resort to the whole world scenery + options->setPluginStringData("SimGear::FG_EARTH", "ON"); + loadedModel = osgDB::readNodeFile("w180s90-360x180.spt", options.get()); + } // if no model has been successfully loaded report failure. if (!loadedModel.valid()) {