Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 10, 2016, 1:54:11 PM (9 years ago)
Author:
landauf
Message:

merged branch cpp11_v2 into cpp11_v3

Location:
code/branches/cpp11_v3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/cpp11_v3

  • code/branches/cpp11_v3/src/libraries/core/GraphicsManager.cc

    r10624 r11054  
    3434#include <sstream>
    3535#include <boost/filesystem.hpp>
    36 #include <boost/shared_array.hpp>
    3736
    3837#include <OgreFrameListener.h>
     
    8382    {
    8483    public:
    85         void windowResized     (Ogre::RenderWindow* rw)
     84        virtual void windowResized     (Ogre::RenderWindow* rw) override
    8685            { orxonox::WindowEventListener::resizeWindow(rw->getWidth(), rw->getHeight()); }
    87         void windowFocusChange (Ogre::RenderWindow* rw)
     86        virtual void windowFocusChange (Ogre::RenderWindow* rw) override
    8887            { orxonox::WindowEventListener::changeWindowFocus(rw->isActive()); }
    89         void windowClosed      (Ogre::RenderWindow* rw)
     88        virtual void windowClosed      (Ogre::RenderWindow* rw) override
    9089            { orxonox::Game::getInstance().stop(); }
    91         void windowMoved       (Ogre::RenderWindow* rw)
     90        virtual void windowMoved       (Ogre::RenderWindow* rw) override
    9291            { orxonox::WindowEventListener::moveWindow(); }
    9392    };
    9493
    95     GraphicsManager* GraphicsManager::singletonPtr_s = 0;
     94    GraphicsManager* GraphicsManager::singletonPtr_s = nullptr;
    9695
    9796    RegisterAbstractClass(GraphicsManager).inheritsFrom<Configurable>();
     
    9998    GraphicsManager::GraphicsManager(bool bLoadRenderer)
    10099        : ogreWindowEventListener_(new OgreWindowEventListener())
    101         , renderWindow_(0)
    102         , viewport_(0)
     100        , renderWindow_(nullptr)
     101        , viewport_(nullptr)
    103102        , lastFrameStartTime_(0.0f)
    104103        , lastFrameEndTime_(0.0f)
     
    178177    void GraphicsManager::upgradeToGraphics()
    179178    {
    180         if (renderWindow_ != NULL)
     179        if (renderWindow_ != nullptr)
    181180            return;
    182181
     
    304303        //       But in our case we only have one viewport for now anyway, therefore
    305304        //       no ScopeGuards or anything to handle exceptions.
    306         this->viewport_ = this->renderWindow_->addViewport(0, 0);
     305        this->viewport_ = this->renderWindow_->addViewport(nullptr, 0);
    307306
    308307        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED);
     
    312311        HWND hwnd;
    313312        this->renderWindow_->getCustomAttribute("WINDOW", (void*)&hwnd);
    314         LONG iconID = (LONG)LoadIcon(GetModuleHandle(0), MAKEINTRESOURCE(101));
     313        LONG iconID = (LONG)LoadIcon(GetModuleHandle(nullptr), MAKEINTRESOURCE(101));
    315314        SetClassLong(hwnd, GCL_HICON, iconID);
    316315#endif
     
    390389        GUIManager::getInstance().setCamera(camera);
    391390
    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);
    394393    }
    395394
Note: See TracChangeset for help on using the changeset viewer.