Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9419


Ignore:
Timestamp:
Oct 29, 2012, 3:48:20 PM (12 years ago)
Author:
davidsa
Message:

Added documentation to orxonox::RenderQueueListener

Location:
code/branches/shaders/src/orxonox
Files:
2 edited

Legend:

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

    r9407 r9419  
    2828 */
    2929
     30/**
     31  @file RenderQueueListener.cc
     32  @brief Definition of the RenderQueueListener class.
     33*/
     34
    3035#include "RenderQueueListener.h"
    3136
     
    3540namespace orxonox
    3641{
     42    /**
     43    @brief
     44    This function is called just before a RenderQueueGroup is rendered, this function is called by Ogre automatically with the correct parameters.
     45
     46    In this case we use it to set the stencil buffer parameters of the render system
     47    */
    3748    void RenderQueueListener::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation)
    3849    {
     
    5667        }
    5768    }
    58    
     69   
     70    /**
     71    @brief
     72        This function is called just after a RenderQueueGroup has been rendered, this function is called by Ogre automatically with the correct parameters.
     73       
     74        in this case we use it to unset the stencil buffer parameters, so the rest of the render queue is unaffected by it.
     75    */
    5976    void RenderQueueListener::renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation)
    6077    {
  • code/branches/shaders/src/orxonox/RenderQueueListener.h

    r9407 r9419  
    2828 */
    2929
     30/**
     31  @file RenderQueueListener.h
     32  @brief Definition of the RenderQueueListener class.
     33*/
     34
    3035#ifndef _ORenderQueueListener_H__
    3136#define _ORenderQueueListener_H__
     
    3742namespace orxonox
    3843{
    39     /* Defining some render queue groups based around the main render queue to enable a stenicl buffer based glow effect */
    40     enum RenderQueueGroupID
     44    enum RenderQueueGroupID //!< these are IDs for render queues that are executed just after the main render queue defined by Ogre, we need more than one for Stencil Glow
    4145    {
    42         RENDER_QUEUE_MAIN = Ogre::RENDER_QUEUE_MAIN,
     46        RENDER_QUEUE_MAIN = Ogre::RENDER_QUEUE_MAIN, //reference to the main render queue
    4347        RENDER_QUEUE_STENCIL_OBJECTS = RENDER_QUEUE_MAIN+1,
    4448        RENDER_QUEUE_STENCIL_GLOW = RENDER_QUEUE_MAIN+2,
    45         RENDER_QUEUE_STENCIL_LAST = RENDER_QUEUE_STENCIL_GLOW
     49        RENDER_QUEUE_STENCIL_LAST = RENDER_QUEUE_STENCIL_GLOW //this is a reference to the last render queue to be affected by stencil glow effects
    4650    };
    4751
    48     const int STENCIL_VALUE_FOR_GLOW = 1; //if more than one type of stencil mask is to be used it needs to use another value
    49     const int STENCIL_FULL_MASK = 0xFFFFFFFF;
     52    const int STENCIL_VALUE_FOR_GLOW = 1; //!< this is a reference value for our mask,
     53                                          //!< if more than one type of stencil mask is to be used, each of them need their own value
     54    const int STENCIL_FULL_MASK = 0xFFFFFFFF; //!< this is a reference mask used in our stencil buffer
    5055   
    51     /* Deriving from the Ogre RenderQueueListener to define our own handling of the different rendering stages to enable alpha based shader/glow effects */
     56    /**
     57    @brief
     58        This class derives from the Ogre-Class RenderQueueListener and provides a way to define new rendering stages to enable use of e.g. stencil buffers
     59        to increase the number of shader effects we can create. Especially important for shader-based alpha blending.
     60
     61    @author
     62        David 'davidsa' Salvisberg
     63    */
    5264    class _OrxonoxExport RenderQueueListener : public Ogre::RenderQueueListener
    5365    {
    5466        public:
     67            /**
     68            @brief
     69                This function is called just before a RenderQueueGroup is rendered, this function is called by Ogre automatically with the correct parameters.
     70               
     71                In this case we use it to set the stencil buffer parameters of the render system
     72            */
    5573            virtual void renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation);
     74            /**
     75            @brief
     76                This function is called just after a RenderQueueGroup has been rendered, this function is called by Ogre automatically with the correct parameters.
     77               
     78                in this case we use it to unset the stencil buffer parameters, so the rest of the render queue is unaffected by it.
     79            */
    5680            virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation);
    5781    };
Note: See TracChangeset for help on using the changeset viewer.