Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 23, 2016, 9:34:29 PM (9 years ago)
Author:
landauf
Message:

enable glow shader in all scenes

Location:
code/trunk/src/orxonox
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/Scene.cc

    r11080 r11085  
    5858#include "Level.h"
    5959#include "RenderQueueListener.h"
     60#include "graphics/GlobalShader.h"
    6061
    6162namespace orxonox
     
    9192
    9293            this->radar_ = new Radar();
     94            this->glowShader_ = new GlobalShader(this);
     95            this->glowShader_->setScene(WeakPtr<Scene>(this), this->getObjectID()); // avoid circular reference
     96            this->glowShader_->getShader().setCompositorName("Glow");
    9397        }
    9498        else
     
    100104            this->renderQueueListener_ = nullptr;
    101105            this->radar_ = nullptr;
     106            this->glowShader_ = nullptr;
    102107        }
    103108
     
    124129            if (this->radar_)
    125130                this->radar_->destroy();
     131            if (this->glowShader_)
     132                this->glowShader_->destroy();
    126133
    127134            if (GameMode::showsGraphics())
  • code/trunk/src/orxonox/Scene.h

    r11080 r11085  
    118118            float                    soundReferenceDistance_; //!< This holds a reference distance, which represents the distance between our scene and the listener
    119119            Radar*                   radar_; //!< This is a pointer to a Radar object assigned with this scene
     120            WeakPtr<GlobalShader>    glowShader_;
    120121
    121122
  • code/trunk/src/orxonox/graphics/GlobalShader.h

    r11071 r11085  
    4848            virtual void changedVisibility() override;
    4949
    50             inline const Shader& getShader() const
     50            inline Shader& getShader()
    5151                { return this->shader_; }
    5252
Note: See TracChangeset for help on using the changeset viewer.