Changeset 534 for code/branches
- Timestamp:
- Dec 15, 2007, 10:48:50 PM (17 years ago)
- Location:
- code/branches/FICN/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/main.cc
r496 r534 75 75 #if OGRE_PLATFORM == OGRE_PLATFORM_APPLE 76 76 orx->init(argc, argv, macBundlePath()); 77 //orx->start();77 orx->start(); 78 78 #else 79 79 orx->init(argc, argv, ""); 80 //orx->start();80 orx->start(); 81 81 #endif 82 82 -
code/branches/FICN/src/orxonox/orxonox.cc
r531 r534 217 217 //TODO: read config file 218 218 //TODO: give config file to Ogre 219 219 220 220 if(argc >=2 && strcmp(argv[1], "server")==0) 221 221 { … … 225 225 { 226 226 clientInit(path); 227 } else if(argc >=2 && strcmp(argv[1], "presentation")==0) 227 } 228 else if(argc >=2 && strcmp(argv[1], "presentation")==0) 228 229 { 229 230 playableServer(path); 230 } else 231 } 232 else 231 233 standalone(path); 232 234 } … … 238 240 { 239 241 //TODO: start modules 240 242 ogre_->startRender(); 241 243 //TODO: run engine 242 }243 244 /**245 * @return singleton object246 */247 Orxonox* Orxonox::getSingleton()248 {249 if (!singletonRef_)250 singletonRef_ = new Orxonox();251 return singletonRef_;252 }253 254 /**255 * error kills orxonox256 */257 void Orxonox::die(/* some error code */)258 {259 //TODO: destroy and destruct everything and print nice error msg260 }261 262 void Orxonox::standalone(std::string path)263 {264 ogre_->setConfigPath(path);265 ogre_->setup();266 root_ = ogre_->getRoot();267 //if(!ogre_->load()) die(/* unable to load */);268 269 defineResources();270 setupRenderSystem();271 createRenderWindow();272 initializeResourceGroups();273 244 createScene(); 274 245 setupScene(); … … 278 249 startRenderLoop(); 279 250 } 280 251 252 /** 253 * @return singleton object 254 */ 255 Orxonox* Orxonox::getSingleton() 256 { 257 if (!singletonRef_) 258 singletonRef_ = new Orxonox(); 259 return singletonRef_; 260 } 261 262 /** 263 * error kills orxonox 264 */ 265 void Orxonox::die(/* some error code */) 266 { 267 //TODO: destroy and destruct everything and print nice error msg 268 } 269 270 void Orxonox::standalone(std::string path) 271 { 272 ogre_->setConfigPath(path); 273 ogre_->setup(); 274 root_ = ogre_->getRoot(); 275 if(!ogre_->load()) die(/* unable to load */); 276 277 //defineResources(); 278 //setupRenderSystem(); 279 //createRenderWindow(); 280 //initializeResourceGroups(); 281 /*createScene(); 282 setupScene(); 283 setupInputSystem(); 284 createFrameListener(); 285 Factory::createClassHierarchy(); 286 startRenderLoop();*/ 287 } 288 281 289 void Orxonox::playableServer(std::string path) 282 290 { … … 294 302 createFrameListener(); 295 303 try{ 296 server_g = new network::Server(); // add port and bindadress297 server_g->open(); // open server and create listener thread298 if(ogre_ && ogre_->getRoot())299 ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server300 std::cout << "network framelistener added" << std::endl;301 } 304 server_g = new network::Server(); // add port and bindadress 305 server_g->open(); // open server and create listener thread 306 if(ogre_ && ogre_->getRoot()) 307 ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server 308 std::cout << "network framelistener added" << std::endl; 309 } 302 310 catch(exception &e) 303 311 {
Note: See TracChangeset
for help on using the changeset viewer.