Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 26, 2011, 5:00:17 PM (13 years ago)
Author:
landauf
Message:

some changes related to camera switching:

  • added ViewportEventListener (currently only listens to camera changes in a viewport)
  • Shader now correctly updates its visibility if the camera changes the scene
  • (the same lines of code also fix the weird Ogre behavior which was originally fixed in CameraManager)
  • GraphicsManager also updates the GUIManager's camera
  • if all cameras are destroyed, CameraManager now officially switches to NULL camera
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/usability/src/libraries/tools/Shader.h

    r5781 r7966  
    3737
    3838#include "util/OgreForwardRefs.h"
    39 #include "tools/interfaces/Tickable.h"
     39#include "core/ViewportEventListener.h"
    4040
    4141namespace orxonox
    4242{
    43     class _ToolsExport Shader : public Tickable
     43    class _ToolsExport Shader : public ViewportEventListener
    4444    {
    4545        typedef std::pair<bool, void*>                  ParameterPointer;
     
    5252            Shader(Ogre::SceneManager* scenemanager = 0);
    5353            virtual ~Shader();
    54 
    55             virtual void tick(float dt);
    5654
    5755            inline void setVisible(bool bVisible)
     
    8381                { return this->scenemanager_; }
    8482
     83            virtual void cameraChanged(Ogre::Viewport* viewport, Ogre::Camera* oldCamera);
     84
    8585            void setParameter(const std::string& material, size_t technique, size_t pass, const std::string& parameter, float value);
    8686            void setParameter(const std::string& material, size_t technique, size_t pass, const std::string& parameter, int value);
Note: See TracChangeset for help on using the changeset viewer.