- Timestamp:
- Jan 10, 2016, 1:54:11 PM (9 years ago)
- Location:
- code/branches/cpp11_v3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v3
- Property svn:mergeinfo changed
-
code/branches/cpp11_v3/src/libraries/core/GraphicsManager.cc
r10624 r11054 34 34 #include <sstream> 35 35 #include <boost/filesystem.hpp> 36 #include <boost/shared_array.hpp>37 36 38 37 #include <OgreFrameListener.h> … … 83 82 { 84 83 public: 85 v oid windowResized (Ogre::RenderWindow* rw)84 virtual void windowResized (Ogre::RenderWindow* rw) override 86 85 { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); } 87 v oid windowFocusChange (Ogre::RenderWindow* rw)86 virtual void windowFocusChange (Ogre::RenderWindow* rw) override 88 87 { orxonox::WindowEventListener::changeWindowFocus(rw->isActive()); } 89 v oid windowClosed (Ogre::RenderWindow* rw)88 virtual void windowClosed (Ogre::RenderWindow* rw) override 90 89 { orxonox::Game::getInstance().stop(); } 91 v oid windowMoved (Ogre::RenderWindow* rw)90 virtual void windowMoved (Ogre::RenderWindow* rw) override 92 91 { orxonox::WindowEventListener::moveWindow(); } 93 92 }; 94 93 95 GraphicsManager* GraphicsManager::singletonPtr_s = 0;94 GraphicsManager* GraphicsManager::singletonPtr_s = nullptr; 96 95 97 96 RegisterAbstractClass(GraphicsManager).inheritsFrom<Configurable>(); … … 99 98 GraphicsManager::GraphicsManager(bool bLoadRenderer) 100 99 : ogreWindowEventListener_(new OgreWindowEventListener()) 101 , renderWindow_( 0)102 , viewport_( 0)100 , renderWindow_(nullptr) 101 , viewport_(nullptr) 103 102 , lastFrameStartTime_(0.0f) 104 103 , lastFrameEndTime_(0.0f) … … 178 177 void GraphicsManager::upgradeToGraphics() 179 178 { 180 if (renderWindow_ != NULL)179 if (renderWindow_ != nullptr) 181 180 return; 182 181 … … 304 303 // But in our case we only have one viewport for now anyway, therefore 305 304 // no ScopeGuards or anything to handle exceptions. 306 this->viewport_ = this->renderWindow_->addViewport( 0, 0);305 this->viewport_ = this->renderWindow_->addViewport(nullptr, 0); 307 306 308 307 Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED); … … 312 311 HWND hwnd; 313 312 this->renderWindow_->getCustomAttribute("WINDOW", (void*)&hwnd); 314 LONG iconID = (LONG)LoadIcon(GetModuleHandle( 0), MAKEINTRESOURCE(101));313 LONG iconID = (LONG)LoadIcon(GetModuleHandle(nullptr), MAKEINTRESOURCE(101)); 315 314 SetClassLong(hwnd, GCL_HICON, iconID); 316 315 #endif … … 390 389 GUIManager::getInstance().setCamera(camera); 391 390 392 for ( ObjectList<ViewportEventListener>::iterator it = ObjectList<ViewportEventListener>::begin(); it != ObjectList<ViewportEventListener>::end(); ++it)393 it->cameraChanged(this->viewport_, oldCamera);391 for (ViewportEventListener* listener : ObjectList<ViewportEventListener>()) 392 listener->cameraChanged(this->viewport_, oldCamera); 394 393 } 395 394
Note: See TracChangeset
for help on using the changeset viewer.