Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 19, 2016, 11:27:40 PM (8 years ago)
Author:
landauf
Message:

merged shaders back to trunk (pps project from HS 2012)

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/Scene.cc

    r11071 r11080  
    2727 *
    2828 */
     29
     30/**
     31@file Scene.cc
     32@brief Implementation of Scene Class
     33*/
     34
    2935
    3036#include "Scene.h"
     
    5157#include "worldentities/WorldEntity.h"
    5258#include "Level.h"
     59#include "RenderQueueListener.h"
    5360
    5461namespace orxonox
    5562{
    5663    RegisterClass(Scene);
    57 
     64   
     65    /**
     66    @brief
     67        Constructor, it sets common standard paramters for a scene depending on whether it will be rendered or not.
     68        It also makes sure we user our own render queue listener for rendering instead of the standard listener provided by Ogre
     69    */
    5870    SetConsoleCommand("Scene", "debugDrawPhysics", &Scene::consoleCommand_debugDrawPhysics).addShortcut().defaultValue(1, true).defaultValue(2, 0.5f);
    5971
     
    7587            this->sceneManager_ = Ogre::Root::getSingleton().createSceneManager(Ogre::ST_GENERIC);
    7688            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
     89            this->renderQueueListener_ = new RenderQueueListener();
     90            this->sceneManager_->addRenderQueueListener(this->renderQueueListener_);//add our own renderQueueListener
    7791
    7892            this->radar_ = new Radar();
     
    8498            this->rootSceneNode_ = this->sceneManager_->getRootSceneNode();
    8599
     100            this->renderQueueListener_ = nullptr;
    86101            this->radar_ = nullptr;
    87102        }
     
    111126
    112127            if (GameMode::showsGraphics())
     128            {
     129                this->sceneManager_->removeRenderQueueListener(this->renderQueueListener_);
     130                delete this->renderQueueListener_;
    113131                Ogre::Root::getSingleton().destroySceneManager(this->sceneManager_);
     132            }
    114133            else
    115134                delete this->sceneManager_;
Note: See TracChangeset for help on using the changeset viewer.