Orxonox  0.0.5 Codename: Arcturus
Public Member Functions | Private Types | Private Attributes | List of all members
orxonox::RenderQueueListener Class Reference

This class derives from the Ogre-Class RenderQueueListener and provides a way to define new rendering stages to enable use of e.g. More...

#include </home/jenkins/workspace/orxonox_doxygen_trunk/src/orxonox/RenderQueueListener.h>

Inheritance diagram for orxonox::RenderQueueListener:

Public Member Functions

 RenderQueueListener ()
 
 ~RenderQueueListener ()
 
unsigned int getPixelCount ()
 This function is returning the current pixel count and resets the pixel state if we're ready to do another Hardware Occlusion Query. More...
 
virtual void renderQueueEnded (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &repeatThisInvocation) override
 This function is called just after a RenderQueueGroup has been rendered, this function is called by Ogre automatically with the correct parameters. More...
 
virtual void renderQueueStarted (Ogre::uint8 queueGroupId, const Ogre::String &invocation, bool &skipThisInvocation) override
 This function is called just before a RenderQueueGroup is rendered, this function is called by Ogre automatically with the correct parameters. More...
 

Private Types

enum  PixelState { PixelState::READY_FOR_RENDER, PixelState::QUERY_STARTED, PixelState::READY_FOR_ACCESS }
 < enum to distinguish the several HOQ pixel count states More...
 

Private Attributes

Ogre::HardwareOcclusionQuery * hardwareOcclusionQuery_
 this stores the current instance of the HOQ used in the render system More...
 
unsigned int pixelCount_
 this stores the last pixel count returned by the last HOQ in the corresponding render group More...
 
PixelState pixelState_
 this stores the current state of the Hardware Occlusion Query More...
 

Detailed Description

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 to increase the number of shader effects we can create. Especially important for shader-based alpha blending.

Author
David 'davidsa' Salvisberg

Member Enumeration Documentation

< enum to distinguish the several HOQ pixel count states

Enumerator
READY_FOR_RENDER 
QUERY_STARTED 
READY_FOR_ACCESS 

Constructor & Destructor Documentation

orxonox::RenderQueueListener::RenderQueueListener ( )
orxonox::RenderQueueListener::~RenderQueueListener ( )

Member Function Documentation

unsigned int orxonox::RenderQueueListener::getPixelCount ( )

This function is returning the current pixel count and resets the pixel state if we're ready to do another Hardware Occlusion Query.

Returns
current pixel count taken from the last Hardware Occlusion Query
void orxonox::RenderQueueListener::renderQueueEnded ( Ogre::uint8  queueGroupId,
const Ogre::String &  invocation,
bool &  repeatThisInvocation 
)
overridevirtual

This function is called just after a RenderQueueGroup has been rendered, this function is called by Ogre automatically with the correct parameters.

in this case we use it to unset the stencil buffer parameters, so the rest of the render queue is unaffected by it.

void orxonox::RenderQueueListener::renderQueueStarted ( Ogre::uint8  queueGroupId,
const Ogre::String &  invocation,
bool &  skipThisInvocation 
)
overridevirtual

This function is called just before a RenderQueueGroup is rendered, this function is called by Ogre automatically with the correct parameters.

In this case we use it to set the stencil buffer parameters of the render system

In this case we use it to set the stencil buffer parameters of the render system and issue a Hardware Occlusion Query

Member Data Documentation

Ogre::HardwareOcclusionQuery* orxonox::RenderQueueListener::hardwareOcclusionQuery_
private

this stores the current instance of the HOQ used in the render system

unsigned int orxonox::RenderQueueListener::pixelCount_
private

this stores the last pixel count returned by the last HOQ in the corresponding render group

PixelState orxonox::RenderQueueListener::pixelState_
private

this stores the current state of the Hardware Occlusion Query


The documentation for this class was generated from the following files: