Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

Ogre::RenderQueue Class Reference

Class to manage the scene object rendering queue. More...

#include <OgreRenderQueue.h>

List of all members.

Public Types

typedef std::map< RenderQueueGroupID,
RenderQueueGroup * > 
RenderQueueGroupMap
typedef MapIterator< RenderQueueGroupMapQueueGroupIterator
 Iterator over queue groups.


Public Methods

 RenderQueue ()
virtual ~RenderQueue ()
void clear (void)
 Empty the queue - should only be called by SceneManagers.

RenderQueueGroupgetQueueGroup (RenderQueueGroupID qid)
 Get a render queue group.

void addRenderable (Renderable *pRend, RenderQueueGroupID groupID, ushort priority)
 Add a renderable object to the queue.

void addRenderable (Renderable *pRend, RenderQueueGroupID groupId)
 Add a renderable object to the queue.

void addRenderable (Renderable *pRend)
 Add a renderable object to the queue.

RenderQueueGroupID getDefaultQueueGroup (void) const
 Gets the current default queue group, which will be used for all renderable which do not specify which group they wish to be on.

void setDefaultRenderablePriority (ushort priority)
 Sets the current default renderable priority, which will be used for all renderables which do not specify which priority they wish to use.

ushort getDefaultRenderablePriority (void) const
 Gets the current default renderable priority, which will be used for all renderables which do not specify which priority they wish to use.

void setDefaultQueueGroup (RenderQueueGroupID grp)
 Sets the current default queue group, which will be used for all renderable which do not specify which group they wish to be on.

QueueGroupIterator _getQueueGroupIterator (void)
 Internal method, returns an iterator for the queue groups.

void setSplitPassesByLightingType (bool split)
 Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.

void setSplitNoShadowPasses (bool split)
 Sets whether or not the queue will split passes which have shadow receive turned off (in their parent material), which is needed when certain shadow techniques are used.


Protected Attributes

RenderQueueGroupMap mGroups
RenderQueueGroupID mDefaultQueueGroup
 The current default queue group.

ushort mDefaultRenderablePriority
 The default priority.

bool mSplitPassesByLightingType
bool mSplitNoShadowPasses


Detailed Description

Class to manage the scene object rendering queue.

Remarks:
Objects are grouped by material to minimise rendering state changes. The map from material to renderable object is wrapped in a class for ease of use.

This class now includes the concept of 'queue groups' which allows the application adding the renderable to specifically schedule it so that it is included in a discrete group. Good for separating renderables into the main scene, backgrounds and overlays, and also could be used in the future for more complex multipass routines like stenciling.

Definition at line 71 of file OgreRenderQueue.h.


Member Typedef Documentation

typedef MapIterator<RenderQueueGroupMap> Ogre::RenderQueue::QueueGroupIterator
 

Iterator over queue groups.

Definition at line 76 of file OgreRenderQueue.h.

Referenced by _getQueueGroupIterator().

typedef std::map< RenderQueueGroupID, RenderQueueGroup* > Ogre::RenderQueue::RenderQueueGroupMap
 

Definition at line 74 of file OgreRenderQueue.h.


Constructor & Destructor Documentation

Ogre::RenderQueue::RenderQueue  
 

Definition at line 37 of file OgreRenderQueue.cpp.

References mDefaultQueueGroup, mDefaultRenderablePriority, mGroups, mSplitNoShadowPasses, mSplitPassesByLightingType, Ogre::RENDER_QUEUE_MAIN, and RENDERABLE_DEFAULT_PRIORITY.

Ogre::RenderQueue::~RenderQueue   [virtual]
 

Definition at line 53 of file OgreRenderQueue.cpp.

References mGroups.


Member Function Documentation

RenderQueue::QueueGroupIterator Ogre::RenderQueue::_getQueueGroupIterator void   
 

Internal method, returns an iterator for the queue groups.

Definition at line 105 of file OgreRenderQueue.cpp.

References mGroups, and QueueGroupIterator.

Referenced by Ogre::SceneManager::_renderVisibleObjects().

void Ogre::RenderQueue::addRenderable Renderable   pRend
 

Add a renderable object to the queue.

Remarks:
This methods adds a Renderable to the queue, which will be rendered later by the SceneManager. This is the simplified version of the call which does not require a queue or priority to be specified. The queue group is taken from the current default (see setDefaultQueueGroup). The queue priority is take from the current default (see setDefaultRenderablePriority).
Note:
Called by implementation of MovableObject::_updateRenderQueue.
Parameters:
pRend  Pointer to the Renderable to be added to the queue

Definition at line 115 of file OgreRenderQueue.cpp.

References addRenderable(), mDefaultQueueGroup, and mDefaultRenderablePriority.

void Ogre::RenderQueue::addRenderable Renderable   pRend,
RenderQueueGroupID    groupId
 

Add a renderable object to the queue.

Remarks:
This methods adds a Renderable to the queue, which will be rendered later by the SceneManager. This is the simplified version of the call which does not require a priority to be specified. The queue priority is take from the current default (see setDefaultRenderablePriority).
Note:
Called by implementation of MovableObject::_updateRenderQueue.
Parameters:
pRend  Pointer to the Renderable to be added to the queue
groupID  The group the renderable is to be added to. This can be used to schedule renderable objects in separate groups such that the SceneManager respects the divisions between the groupings and does not reorder them outside these boundaries. This can be handy for overlays where no matter what you want the overlay to be rendered last.

Definition at line 110 of file OgreRenderQueue.cpp.

References addRenderable(), mDefaultRenderablePriority, and Ogre::RenderQueueGroupID.

void Ogre::RenderQueue::addRenderable Renderable   pRend,
RenderQueueGroupID    groupID,
ushort    priority
 

Add a renderable object to the queue.

Remarks:
This methods adds a Renderable to the queue, which will be rendered later by the SceneManager. This is the advanced version of the call which allows the renderable to be added to any queue.
Note:
Called by implementation of MovableObject::_updateRenderQueue.
Parameters:
pRend  Pointer to the Renderable to be added to the queue
groupID  The group the renderable is to be added to. This can be used to schedule renderable objects in separate groups such that the SceneManager respects the divisions between the groupings and does not reorder them outside these boundaries. This can be handy for overlays where no matter what you want the overlay to be rendered last.
priority  Controls the priority of the renderable within the queue group. If this number is raised, the renderable will be rendered later in the group compared to it's peers. Don't use this unless you really need to, manually ordering renderables prevents OGRE from sorting them for best efficiency. However this could be useful for ordering 2D elements manually for example.

Definition at line 74 of file OgreRenderQueue.cpp.

References Ogre::RenderQueueGroup::addRenderable(), Ogre::Renderable::getMaterial(), getQueueGroup(), Ogre::RenderQueueGroupID, Ogre::Material::touch(), and Ogre::ushort.

Referenced by Ogre::SceneNode::_addBoundingBoxToQueue(), Ogre::SceneNode::_findVisibleObjects(), Ogre::OctreeSceneManager::_findVisibleObjects(), Ogre::SceneManager::_queueSkiesForRendering(), Ogre::TerrainRenderable::_updateRenderQueue(), Ogre::SimpleRenderable::_updateRenderQueue(), Ogre::GuiElement::_updateRenderQueue(), Ogre::Frustum::_updateRenderQueue(), Ogre::Entity::_updateRenderQueue(), Ogre::BorderPanelGuiElement::_updateRenderQueue(), Ogre::BillboardSet::_updateRenderQueue(), and addRenderable().

void Ogre::RenderQueue::clear void   
 

Empty the queue - should only be called by SceneManagers.

Definition at line 85 of file OgreRenderQueue.cpp.

References mGroups.

Referenced by Ogre::OctreeSceneManager::_findVisibleObjects(), and Ogre::SceneManager::_renderScene().

RenderQueueGroupID Ogre::RenderQueue::getDefaultQueueGroup void    const
 

Gets the current default queue group, which will be used for all renderable which do not specify which group they wish to be on.

Definition at line 120 of file OgreRenderQueue.cpp.

References mDefaultQueueGroup, and Ogre::RenderQueueGroupID.

Referenced by Ogre::Overlay::_findVisibleObjects().

ushort Ogre::RenderQueue::getDefaultRenderablePriority void    const
 

Gets the current default renderable priority, which will be used for all renderables which do not specify which priority they wish to use.

Definition at line 130 of file OgreRenderQueue.cpp.

References mDefaultRenderablePriority, and Ogre::ushort.

RenderQueueGroup * Ogre::RenderQueue::getQueueGroup RenderQueueGroupID    qid
 

Get a render queue group.

Remarks:
OGRE registers new queue groups as they are requested, therefore this method will always return a valid group.

Definition at line 142 of file OgreRenderQueue.cpp.

References mGroups, mSplitNoShadowPasses, mSplitPassesByLightingType, and Ogre::RenderQueueGroupID.

Referenced by addRenderable(), and Ogre::SceneManager::initRenderQueue().

void Ogre::RenderQueue::setDefaultQueueGroup RenderQueueGroupID    grp
 

Sets the current default queue group, which will be used for all renderable which do not specify which group they wish to be on.

Definition at line 125 of file OgreRenderQueue.cpp.

References mDefaultQueueGroup, and Ogre::RenderQueueGroupID.

Referenced by Ogre::Overlay::_findVisibleObjects().

void Ogre::RenderQueue::setDefaultRenderablePriority ushort    priority
 

Sets the current default renderable priority, which will be used for all renderables which do not specify which priority they wish to use.

Definition at line 135 of file OgreRenderQueue.cpp.

References mDefaultRenderablePriority, and Ogre::ushort.

Referenced by Ogre::Overlay::_findVisibleObjects().

void Ogre::RenderQueue::setSplitNoShadowPasses bool    split
 

Sets whether or not the queue will split passes which have shadow receive turned off (in their parent material), which is needed when certain shadow techniques are used.

Definition at line 177 of file OgreRenderQueue.cpp.

References mGroups, and mSplitNoShadowPasses.

Referenced by Ogre::SceneManager::setShadowTechnique().

void Ogre::RenderQueue::setSplitPassesByLightingType bool    split
 

Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal.

Definition at line 164 of file OgreRenderQueue.cpp.

References mGroups, and mSplitPassesByLightingType.

Referenced by Ogre::SceneManager::setShadowTechnique().


Member Data Documentation

RenderQueueGroupID Ogre::RenderQueue::mDefaultQueueGroup [protected]
 

The current default queue group.

Definition at line 80 of file OgreRenderQueue.h.

Referenced by addRenderable(), getDefaultQueueGroup(), RenderQueue(), and setDefaultQueueGroup().

ushort Ogre::RenderQueue::mDefaultRenderablePriority [protected]
 

The default priority.

Definition at line 82 of file OgreRenderQueue.h.

Referenced by addRenderable(), getDefaultRenderablePriority(), RenderQueue(), and setDefaultRenderablePriority().

RenderQueueGroupMap Ogre::RenderQueue::mGroups [protected]
 

Definition at line 78 of file OgreRenderQueue.h.

Referenced by _getQueueGroupIterator(), clear(), getQueueGroup(), RenderQueue(), setSplitNoShadowPasses(), setSplitPassesByLightingType(), and ~RenderQueue().

bool Ogre::RenderQueue::mSplitNoShadowPasses [protected]
 

Definition at line 85 of file OgreRenderQueue.h.

Referenced by getQueueGroup(), RenderQueue(), and setSplitNoShadowPasses().

bool Ogre::RenderQueue::mSplitPassesByLightingType [protected]
 

Definition at line 84 of file OgreRenderQueue.h.

Referenced by getQueueGroup(), RenderQueue(), and setSplitPassesByLightingType().


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

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:51:29 2004