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/libraries/core
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/libraries/core/CorePrereqs.h

    r11071 r11085  
    184184    struct GameStateInfo;
    185185    struct GameStateTreeNode;
     186    class GlowMaterialListener;
    186187    class GraphicsManager;
    187188    class GUIManager;
  • code/trunk/src/libraries/core/GraphicsManager.cc

    r11071 r11085  
    3838#include <OgreRoot.h>
    3939#include <OgreLogManager.h>
     40#include <OgreMaterialManager.h>
    4041#include <OgreRenderWindow.h>
    4142#include <OgreRenderSystem.h>
     
    5657#include "Game.h"
    5758#include "GameMode.h"
     59#include "GlowMaterialListener.h"
    5860#include "GUIManager.h"
    5961#include "Loader.h"
     
    100102        , renderWindow_(nullptr)
    101103        , viewport_(nullptr)
     104        , glowMaterialListener_(nullptr)
    102105        , lastFrameStartTime_(0.0f)
    103106        , lastFrameEndTime_(0.0f)
     
    140143        orxout(internal_status) << "destroying GraphicsManager..." << endl;
    141144
     145        Ogre::MaterialManager::getSingleton().removeListener(this->glowMaterialListener_);
    142146        Ogre::WindowEventUtilities::removeWindowEventListener(renderWindow_, ogreWindowEventListener_);
     147
    143148        ModifyConsoleCommand(__CC_printScreen_name).resetFunction();
    144149        ModifyConsoleCommand(__CC_GraphicsManager_group, __CC_setScreenResolution_name).resetFunction();
     
    153158        safeObjectDelete(&ogreLogger_);
    154159        safeObjectDelete(&ogreWindowEventListener_);
     160        safeObjectDelete(&glowMaterialListener_);
    155161
    156162        orxout(internal_status) << "finished destroying GraphicsManager" << endl;
     
    306312
    307313        Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(Ogre::MIP_UNLIMITED);
     314
     315        this->glowMaterialListener_ = new GlowMaterialListener();
     316        Ogre::MaterialManager::getSingleton().addListener(this->glowMaterialListener_);
    308317
    309318        //Add program icon
  • code/trunk/src/libraries/core/GraphicsManager.h

    r11071 r11085  
    127127        Ogre::LogManager*        ogreLogger_;
    128128        Ogre::Root*              ogreRoot_;                //!< Ogre's root
    129         Ogre::RenderWindow* renderWindow_;             //!< the one and only render window
    130         Ogre::Viewport*     viewport_;                 //!< default full size viewport
    131         float               lastFrameStartTime_;       //!< Time stamp of the beginning of the last frame
    132         float               lastFrameEndTime_;         //!< Time stamp of the end of the last frame
     129        Ogre::RenderWindow*      renderWindow_;            //!< the one and only render window
     130        Ogre::Viewport*          viewport_;                //!< default full size viewport
     131        GlowMaterialListener*    glowMaterialListener_;    //!< Material Listener for the 'Glow' compositor
     132        float                    lastFrameStartTime_;      //!< Time stamp of the beginning of the last frame
     133        float                    lastFrameEndTime_;        //!< Time stamp of the end of the last frame
    133134
    134135        // XML files for the resources and the debug overlay
Note: See TracChangeset for help on using the changeset viewer.