X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffgviewer.cxx;h=428bc2c328e24312261ba6d977ae89376a7b6f28;hb=38226af24ec01e8f0a20d7fd73ef838a69f6ef25;hp=3ab9570b5536e2abddf714d777f9dca31a743092;hpb=8bac481865cc4067e27f723d2cae4c665bb259da;p=flightgear.git diff --git a/src/Main/fgviewer.cxx b/src/Main/fgviewer.cxx index 3ab9570b5..428bc2c32 100644 --- a/src/Main/fgviewer.cxx +++ b/src/Main/fgviewer.cxx @@ -1,3 +1,7 @@ +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + #include #include @@ -68,8 +72,6 @@ static void dumpOut(osg::Node* node) char filename[24]; static int count = 1; - FGRenderer *renderer = globals->get_renderer(); - while (count < 1000) { FILE *fp; snprintf(filename, 24, "fgviewer-%03d.osg", count++); @@ -102,6 +104,7 @@ bool GraphDumpHandler::handle(const osgGA::GUIEventAdapter& ea, default: return false; } + return false; } void GraphDumpHandler::getUsage(osg::ApplicationUsage& usage) const @@ -146,15 +149,14 @@ fgviewerMain(int argc, char** argv) osgGA::KeySwitchMatrixManipulator* keyswitchManipulator; keyswitchManipulator = new osgGA::KeySwitchMatrixManipulator; - osgGA::MatrixManipulator* mm = new osgGA::TrackballManipulator; - keyswitchManipulator->addMatrixManipulator('1', "Trackball", mm); - mm = new osgGA::FlightManipulator; - keyswitchManipulator->addMatrixManipulator('2', "Flight", mm); - mm = new osgGA::DriveManipulator; - keyswitchManipulator->addMatrixManipulator('3', "Drive", mm); - mm = new osgGA::TerrainManipulator; - keyswitchManipulator->addMatrixManipulator('4', "Terrain", mm); - + keyswitchManipulator->addMatrixManipulator('1', "Trackball", + new osgGA::TrackballManipulator); + keyswitchManipulator->addMatrixManipulator('2', "Flight", + new osgGA::FlightManipulator); + keyswitchManipulator->addMatrixManipulator('3', "Drive", + new osgGA::DriveManipulator); + keyswitchManipulator->addMatrixManipulator('4', "Terrain", + new osgGA::TerrainManipulator); viewer.setCameraManipulator(keyswitchManipulator); // Usefull stats