Changeset 1150 for code/branches/network2/src/orxonox
- Timestamp:
- Apr 23, 2008, 11:40:40 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/network2/src/orxonox/Orxonox.cc
r1132 r1150 333 333 334 334 //setupInputSystem(); 335 335 std::cout << "STARTING RENDERLOOP" << std::endl; 336 336 startRenderLoop(); 337 337 } … … 416 416 void Orxonox::startRenderLoop() 417 417 { 418 ///std::cout << "ON LINE 418 IN Orxonox.cc on frame " << std::endl; 418 419 InputBuffer* ib = new InputBuffer(); 419 420 InputManager::getSingleton().feedInputBuffer(ib); … … 423 424 ib->registerListener(console, &Testconsole::execute, '\n', false); 424 425 ib->registerListener(console, &Testconsole::hintandcomplete, '\t', true); 425 ib->registerListener(console, &Testconsole::clear, ' §', true);426 ib->registerListener(console, &Testconsole::clear, '�', true); 426 427 ib->registerListener(console, &Testconsole::removeLast, '\b', true); 427 428 ib->registerListener(console, &Testconsole::exit, (char)0x1B, true); … … 435 436 Ogre::Root& ogreRoot = Ogre::Root::getSingleton(); 436 437 437 438 ///std::cout << "ON LINE 437 IN Orxonox.cc" << std::endl; 438 439 // Contains the times of recently fired events 439 440 // eventTimes[4] is the list for the times required for the fps counter … … 450 451 timer_ = new Ogre::Timer(); 451 452 timer_->reset(); 452 453 ///std::cout << "ON LINE 452 IN Orxonox.cc" << std::endl; 454 int counter = 0; 453 455 while (!bAbort_) 454 456 { … … 456 458 // This calls the WindowEventListener objects. 457 459 Ogre::WindowEventUtilities::messagePump(); 458 460 ///std::cout << "ON LINE 459 IN Orxonox.cc on frame " << counter << std::endl; 459 461 // get current time 460 462 unsigned long now = timer_->getMilliseconds(); … … 466 468 evt.timeSinceLastEvent = calculateEventTime(now, eventTimes[0]); 467 469 evt.timeSinceLastFrame = calculateEventTime(now, eventTimes[1]); 470 ///std::cout << "ON LINE 468 IN Orxonox.cc on frame " << counter << std::endl; 468 471 469 472 // show the current time in the HUD 470 orxonoxHUD_->setTime((int)now, 0); 471 if (eventTimes[3].back() - eventTimes[3].front() != 0) 472 orxonoxHUD_->setRocket1((int)(20000.0f/(eventTimes[3].back() - eventTimes[3].front()))); 473 473 ///### THE FOLLOWING HUD STUFF SEEMS TO CREATE SEGFAULT IN NETWORK 474 ///orxonoxHUD_->setTime((int)now, 0); 475 ///std::cout << "ON LINE 473 IN Orxonox.cc on frame " << counter << std::endl; 476 ///if (eventTimes[3].back() - eventTimes[3].front() != 0) 477 ///orxonoxHUD_->setRocket1((int)(20000.0f/(eventTimes[3].back() - eventTimes[3].front()))); 478 ///std::cout << "ON LINE 476 IN Orxonox.cc on frame " << counter << std::endl; 474 479 // Iterate through all Tickables and call their tick(dt) function 475 480 for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; ++it) 476 481 it->tick((float)evt.timeSinceLastFrame * this->timefactor_); 482 ///std::cout << "ON LINE 476 IN Orxonox.cc on frame " << counter << std::endl; 477 483 478 484 // don't forget to call _fireFrameStarted in ogre to make sure … … 493 499 // again, just to be sure ogre works fine 494 500 ogreRoot._fireFrameEnded(evt); 501 counter++; 495 502 } 496 503 }
Note: See TracChangeset
for help on using the changeset viewer.