Changeset 1214 for code/trunk/src/orxonox/GraphicsEngine.cc
- Timestamp:
- May 2, 2008, 9:23:30 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/orxonox/GraphicsEngine.cc
r1090 r1214 40 40 #include <OgreLogManager.h> 41 41 #include <OgreTextureManager.h> 42 #include <OgreRenderWindow.h> 43 42 #include "core/InputManager.h" 44 43 #include "core/CoreIncludes.h" 45 44 #include "core/ConfigValueIncludes.h" 46 45 #include "core/Debug.h" 46 #include "core/TclBind.h" 47 47 48 48 … … 90 90 { 91 91 COUT(4) << "*** GraphicsEngine: Destroying objects..." << std::endl; 92 Ogre::WindowEventUtilities::removeWindowEventListener(this->renderWindow_, this); 92 93 if (this->root_) 93 94 delete this->root_; … … 112 113 SetConfigValue(ogreLogLevelNormal_ , 4).description("Corresponding orxonox debug level for ogre Normal"); 113 114 SetConfigValue(ogreLogLevelCritical_, 2).description("Corresponding orxonox debug level for ogre Critical"); 115 116 TclBind::getInstance().setDataPath(this->dataPath_); 114 117 } 115 118 … … 184 187 { 185 188 this->renderWindow_ = root_->initialise(true, "OrxonoxV2"); 189 Ogre::WindowEventUtilities::addWindowEventListener(this->renderWindow_, this); 186 190 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5); 187 191 //TODO: Do NOT load all the groups, why are we doing that? And do we really do that? initialise != load... … … 289 293 << "*** Ogre: " << message << std::endl; 290 294 } 295 296 void GraphicsEngine::windowMoved(Ogre::RenderWindow *rw){ 297 int w = rw->getWidth(); 298 int h = rw->getHeight(); 299 InputManager::getSingleton().setWindowExtents(w, h); 300 } 301 302 void GraphicsEngine::windowResized(Ogre::RenderWindow *rw){ 303 int w = rw->getWidth(); 304 int h = rw->getHeight(); 305 InputManager::getSingleton().setWindowExtents(w, h); 306 } 307 308 void GraphicsEngine::windowFocusChanged(Ogre::RenderWindow *rw){ 309 int w = rw->getWidth(); 310 int h = rw->getHeight(); 311 InputManager::getSingleton().setWindowExtents(w, h); 312 } 291 313 }
Note: See TracChangeset
for help on using the changeset viewer.