Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 11075


Ignore:
Timestamp:
Jan 18, 2016, 10:35:11 PM (8 years ago)
Author:
landauf
Message:

fixed author and added some c++11 features

Location:
code/branches/shaders_merge/src/orxonox
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shaders_merge/src/orxonox/RenderQueueListener.cc

    r11074 r11075  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
    24  *      Reto Grieder (physics)
     23 *      David 'davidsa' Salvisberg
    2524 *   Co-authors:
    2625 *      ...
     
    4140namespace orxonox
    4241{
    43     RenderQueueListener::RenderQueueListener() : pixelCount_(0), pixelState_(RenderQueueListener::READY_FOR_RENDER)
     42    RenderQueueListener::RenderQueueListener() : pixelCount_(0), pixelState_(PixelState::READY_FOR_RENDER)
    4443    {
    4544        hardwareOcclusionQuery_ = Ogre::Root::getSingleton().getRenderSystem()->createHardwareOcclusionQuery(); //create a new HOQ for the scene this listener is used in
     
    6059    unsigned int RenderQueueListener::getPixelCount()
    6160    {
    62         if(this->pixelState_==RenderQueueListener::READY_FOR_ACCESS)
     61        if(this->pixelState_==PixelState::READY_FOR_ACCESS)
    6362        {
    6463            this->hardwareOcclusionQuery_->pullOcclusionQuery(&(this->pixelCount_));
    65             this->pixelState_=RenderQueueListener::READY_FOR_RENDER;
     64            this->pixelState_=PixelState::READY_FOR_RENDER;
    6665        }
    6766        return this->pixelCount_;
     
    9493                Ogre::SOP_KEEP,Ogre::SOP_KEEP,Ogre::SOP_REPLACE,false);       
    9594        }
    96         if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==RenderQueueListener::READY_FOR_RENDER)
     95        if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==PixelState::READY_FOR_RENDER)
    9796        {
    9897            this->hardwareOcclusionQuery_->beginOcclusionQuery();
    99             this->pixelState_=RenderQueueListener::QUERY_STARTED;
     98            this->pixelState_=PixelState::QUERY_STARTED;
    10099            //TODO: Skip this rendering step altogheter if we haven't requested the pixel count yet, not sure if this is possible without a custom SceneManager
    101100        }
     
    116115            renderSystem->setStencilBufferParams();
    117116        }
    118         if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==RenderQueueListener::QUERY_STARTED)
     117        if (queueGroupId == RENDER_QUEUE_HOQ && this->pixelState_==PixelState::QUERY_STARTED)
    119118        {
    120119            this->hardwareOcclusionQuery_->endOcclusionQuery();
    121             this->pixelState_=RenderQueueListener::READY_FOR_ACCESS;
     120            this->pixelState_=PixelState::READY_FOR_ACCESS;
    122121        }
    123122    }
  • code/branches/shaders_merge/src/orxonox/RenderQueueListener.h

    r11074 r11075  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
    24  *      Reto Grieder (physics)
     23 *      David 'davidsa' Salvisberg
    2524 *   Co-authors:
    2625 *      ...
     
    5251    };
    5352
    54     const int STENCIL_VALUE_FOR_GLOW = 1; //!< this is a reference value for our mask,
     53    constexpr int STENCIL_VALUE_FOR_GLOW = 1; //!< this is a reference value for our mask,
    5554                                          //!< if more than one type of stencil mask is to be used, each of them need their own value
    56     const int STENCIL_FULL_MASK = 0xFFFFFFFF; //!< this is a reference mask used in our stencil buffer
     55    constexpr int STENCIL_FULL_MASK = 0xFFFFFFFF; //!< this is a reference mask used in our stencil buffer
    5756   
    5857    /**
     
    8584                In this case we use it to set the stencil buffer parameters of the render system
    8685            */
    87             virtual void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation);
     86            virtual void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation) override;
    8887            /**
    8988            @brief
     
    9291                in this case we use it to unset the stencil buffer parameters, so the rest of the render queue is unaffected by it.
    9392            */
    94             virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation);
     93            virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation) override;
    9594           
    9695        private:
     
    9897            unsigned int pixelCount_; //!< this stores the last pixel count returned by the last HOQ in the corresponding render group
    9998           
    100             enum PixelState //!< enum to distinguish the several HOQ pixel count states
     99            enum class PixelState //!< enum to distinguish the several HOQ pixel count states
    101100            {
    102101                READY_FOR_RENDER,
  • code/branches/shaders_merge/src/orxonox/graphics/Billboard.cc

    r11073 r11075  
    175175    {
    176176        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    177         if( bSet != NULL )
     177        if( bSet != nullptr )
    178178        {
    179179            bSet->setRenderQueueGroup(groupID);
     
    184184    {
    185185        Ogre::BillboardSet* bSet = this->billboard_.getBillboardSet();
    186         if( bSet != NULL )
     186        if( bSet != nullptr )
    187187        {
    188188            bSet->setBounds(Ogre::AxisAlignedBox(Ogre::AxisAlignedBox::EXTENT_INFINITE),0);
  • code/branches/shaders_merge/src/orxonox/graphics/LensFlare.cc

    r11074 r11075  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
    24  *      Reto Grieder (physics)
     23 *      David 'davidsa' Salvisberg
    2524 *   Co-authors:
    2625 *      ...
  • code/branches/shaders_merge/src/orxonox/graphics/LensFlare.h

    r11074 r11075  
    2121 *
    2222 *   Author:
    23  *      Fabian 'x3n' Landau
    24  *      Reto Grieder (physics)
     23 *      David 'davidsa' Salvisberg
    2524 *   Co-authors:
    2625 *      ...
     
    164163                { return this->fadeOnViewBorder_; }
    165164
    166             virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
     165            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
    167166
    168             virtual void tick(float dt);
     167            virtual void tick(float dt) override;
    169168
    170             virtual void changedVisibility();
     169            virtual void changedVisibility() override;
    171170
    172171        private:
Note: See TracChangeset for help on using the changeset viewer.