Changeset 5876 for code/branches/core5/src/libraries/core
- Timestamp:
- Oct 4, 2009, 11:08:14 PM (15 years ago)
- Location:
- code/branches/core5/src/libraries/core
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/Core.cc
r5875 r5876 289 289 inputManager_.reset(new InputManager()); 290 290 291 // load the CEGUI interface291 // Load the CEGUI interface 292 292 guiManager_.reset(new GUIManager(graphicsManager_->getRenderWindow(), 293 293 inputManager_->getMousePosition(), graphicsManager_->isFullScreen())); … … 295 295 bGraphicsLoaded_ = true; 296 296 GameMode::bShowsGraphics_s = true; 297 298 // Load some sort of a debug overlay (only denoted by its name, "debug.oxo") 299 graphicsManager_->loadDebugOverlay(); 297 300 298 301 // Create singletons associated with graphics (in other libraries) -
code/branches/core5/src/libraries/core/GraphicsManager.cc
r5855 r5876 130 130 GraphicsManager::~GraphicsManager() 131 131 { 132 Loader::unload(debugOverlay_.get()); 133 132 134 Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_.get()); 133 135 // TODO: Destroy the console command … … 322 324 } 323 325 326 void GraphicsManager::loadDebugOverlay() 327 { 328 // Load debug overlay to show info about fps and tick time 329 COUT(4) << "Loading Debug Overlay..." << std::endl; 330 debugOverlay_.reset(new XMLFile("debug.oxo")); 331 Loader::open(debugOverlay_.get()); 332 } 333 334 /** 335 @note 336 A note about the Ogre::FrameListener: Even though we don't use them, 337 they still get called. However, the delta times are not correct (except 338 for timeSinceLastFrame, which is the most important). A little research 339 as shown that there is probably only one FrameListener that doesn't even 340 need the time. So we shouldn't run into problems. 341 */ 324 342 void GraphicsManager::update(const Clock& time) 325 343 { -
code/branches/core5/src/libraries/core/GraphicsManager.h
r5738 r5876 71 71 72 72 void upgradeToGraphics(); 73 void loadDebugOverlay(); 73 74 bool rendererLoaded() const { return renderWindow_ != NULL; } 74 75 … … 99 100 Ogre::Viewport* viewport_; //!< default full size viewport 100 101 101 // XML files for the resources 102 // XML files for the resources and the debug overlay 102 103 shared_ptr<XMLFile> resources_; //!< XML with resource locations 103 104 shared_ptr<XMLFile> extResources_; //!< XML with resource locations in the external path (only for dev runs) 105 shared_ptr<XMLFile> debugOverlay_; //!< XML with various debug overlays 104 106 105 107 // config values
Note: See TracChangeset
for help on using the changeset viewer.