Changeset 531 for code/branches/FICN/src/orxonox/orxonox.cc
- Timestamp:
- Dec 15, 2007, 6:37:35 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/orxonox.cc
r530 r531 217 217 //TODO: read config file 218 218 //TODO: give config file to Ogre 219 219 220 if(argc >=2 && strcmp(argv[1], "server")==0) 220 221 { … … 224 225 { 225 226 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); 228 232 } 229 233 … … 272 276 createFrameListener(); 273 277 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 } 274 306 startRenderLoop(); 275 307 }
Note: See TracChangeset
for help on using the changeset viewer.