Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Dec 15, 2007, 6:37:35 AM (18 years ago)
Author:
scheusso
Message:

started implementing presentation ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/FICN/src/orxonox/orxonox.cc

    r530 r531  
    217217    //TODO: read config file
    218218    //TODO: give config file to Ogre
     219   
    219220    if(argc >=2 && strcmp(argv[1], "server")==0)
    220221    {
     
    224225    {
    225226      clientInit(path);
    226     }
    227     standalone(path);
     227    } else if(argc >=2 && strcmp(argv[1], "presentation")==0)
     228    {
     229      playableServer(path);
     230    } else
     231      standalone(path);
    228232  }
    229233
     
    272276    createFrameListener();
    273277    Factory::createClassHierarchy();
     278    startRenderLoop();
     279  }
     280 
     281  void Orxonox::playableServer(std::string path)
     282  {
     283    ogre_->setConfigPath(path);
     284    ogre_->setup();
     285    root_ = ogre_->getRoot();
     286    defineResources();
     287    setupRenderSystem();
     288    createRenderWindow();
     289    initializeResourceGroups();
     290    createScene();
     291    setupScene();
     292    setupInputSystem();
     293    Factory::createClassHierarchy();
     294    createFrameListener();
     295    try{
     296    server_g = new network::Server(); // add port and bindadress
     297    server_g->open(); // open server and create listener thread
     298    if(ogre_ && ogre_->getRoot())
     299      ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server
     300    std::cout << "network framelistener added" << std::endl;
     301    }
     302    catch(exception &e)
     303    {
     304      std::cout << "There was a problem initialising the server :(" << std::endl;
     305    }
    274306    startRenderLoop();
    275307  }
Note: See TracChangeset for help on using the changeset viewer.