diff --git a/src/Demos/osghangglide/Makefile b/src/Demos/osghangglide/Makefile index 82bb0cc63..62930ea68 100644 --- a/src/Demos/osghangglide/Makefile +++ b/src/Demos/osghangglide/Makefile @@ -19,7 +19,6 @@ HEADERFILES = \ terrain_texcoords.h\ LIBS += $(OSG_LIBS) $(GLUT_LIB) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) -#LIBS += -losgProducer -l Producer $(OSG_LIBS) $(GL_LIBS) $(X_LIBS) $(OTHER_LIBS) INSTFILES = \ $(CXXFILES)\ @@ -28,8 +27,4 @@ INSTFILES = \ EXEC = osghangglide -CXXFLAGS += -DUSE_GLUT -#CXXFLAGS += $(PRODUCER_INCLUDE_DIR) -#LDFLAGS += $(PRODUCER_LIB_DIR) - include $(TOPDIR)/Make/makerules diff --git a/src/Demos/osghangglide/osghangglide.cpp b/src/Demos/osghangglide/osghangglide.cpp index 8483d7118..c6a4f4a4c 100644 --- a/src/Demos/osghangglide/osghangglide.cpp +++ b/src/Demos/osghangglide/osghangglide.cpp @@ -12,6 +12,9 @@ #include +#include +#include + #include "GliderManipulator.h" extern osg::Node *makeTerrain( void ); @@ -99,11 +102,6 @@ osg::Group* createModel() return group; } -#ifdef USE_GLUT - -#include -#include - int main( int argc, char **argv ) { glutInit( &argc, argv ); @@ -142,93 +140,3 @@ int main( int argc, char **argv ) return 0; } -#else - -#include - -int main( int argc, char **argv ) -{ - // create the commandline args. - std::string pathfile; - std::string configfile; - std::vector commandLine; - for(int i=1;i= argc ) { - std::cout << "path argument required for -p option."<= argc ) { - std::cout << "path argument required for -c option."<readCommandLine(commandLine); - osgDB::readCommandLine(commandLine); - - osgProducer::Viewer* viewer = 0; - if (!configfile.empty()) viewer = new osgProducer::Viewer(configfile); - else viewer = new osgProducer::Viewer; - - // configure the plugin registry from the commandline arguments, and - // eat any parameters that have been matched. - osgDB::readCommandLine(commandLine); - - // load the nodes from the commandline arguments. - osg::Node* rootnode = osgDB::readNodeFiles(commandLine); - if (!rootnode) rootnode = createModel(); - - - // set the scene to render - viewer->setSceneData(rootnode); - - // set up the value with sensible defaults. - viewer->setUpViewer(); - - unsigned int pos = viewer->addCameraManipulator(new GliderManipulator()); - viewer->selectCameraManipulator(pos); - - if( !pathfile.empty() ) { - osg::ref_ptr apm = new osgGA::AnimationPathManipulator(pathfile); - if( apm.valid() && apm->valid() ) - { - unsigned int num = viewer->addCameraManipulator(apm.get()); - viewer->selectCameraManipulator(num); - } - } - - - // set up the stack size - viewer->setStackSize( 20* 1024 * 1024); - - // create the windows and run the threads. - viewer->realize(Producer::CameraGroup::ThreadPerCamera); - - while( !viewer->done() ) - { - // wait for all cull and draw threads to complete. - viewer->sync(); - - // update the scene by traversing it with the the update visitor which will - // call all node update callbacks and animations. - viewer->update(); - - // fire off the cull and draw traversals of the scene. - viewer->frame(); - - } - return 0; -} - -#endif