Changeset 9419
- Timestamp:
- Oct 29, 2012, 3:48:20 PM (12 years ago)
- Location:
- code/branches/shaders/src/orxonox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/shaders/src/orxonox/RenderQueueListener.cc
r9407 r9419 28 28 */ 29 29 30 /** 31 @file RenderQueueListener.cc 32 @brief Definition of the RenderQueueListener class. 33 */ 34 30 35 #include "RenderQueueListener.h" 31 36 … … 35 40 namespace orxonox 36 41 { 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 */ 37 48 void RenderQueueListener::renderQueueStarted(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& skipThisInvocation) 38 49 { … … 56 67 } 57 68 } 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 */ 59 76 void RenderQueueListener::renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation) 60 77 { -
code/branches/shaders/src/orxonox/RenderQueueListener.h
r9407 r9419 28 28 */ 29 29 30 /** 31 @file RenderQueueListener.h 32 @brief Definition of the RenderQueueListener class. 33 */ 34 30 35 #ifndef _ORenderQueueListener_H__ 31 36 #define _ORenderQueueListener_H__ … … 37 42 namespace orxonox 38 43 { 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 41 45 { 42 RENDER_QUEUE_MAIN = Ogre::RENDER_QUEUE_MAIN, 46 RENDER_QUEUE_MAIN = Ogre::RENDER_QUEUE_MAIN, //reference to the main render queue 43 47 RENDER_QUEUE_STENCIL_OBJECTS = RENDER_QUEUE_MAIN+1, 44 48 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 46 50 }; 47 51 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 50 55 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 */ 52 64 class _OrxonoxExport RenderQueueListener : public Ogre::RenderQueueListener 53 65 { 54 66 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 */ 55 73 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 */ 56 80 virtual void renderQueueEnded(Ogre::uint8 queueGroupId, const Ogre::String& invocation, bool& repeatThisInvocation); 57 81 };
Note: See TracChangeset
for help on using the changeset viewer.