Ogre::RenderQueue Class Reference
Core » RenderSystem

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

`#include <OgreRenderQueue.h>`

Inheritance diagram for Ogre::RenderQueue:
[legend]

## Classes

class | RenderableListener
| Class to listen in on items being added to the render queue. More...

## Public Types

typedef ConstMapIterator< RenderQueueGroupMap > | ConstQueueGroupIterator
typedef MapIterator< RenderQueueGroupMap > | QueueGroupIterator
| Iterator over queue groups. More...
typedef map< uint8, RenderQueueGroup *>::type | RenderQueueGroupMap

## Public Member Functions

| RenderQueue ()
virtual | ~RenderQueue ()
QueueGroupIterator | _getQueueGroupIterator (void)
| Internal method, returns an iterator for the queue groups. More...
ConstQueueGroupIterator | _getQueueGroupIterator (void) const
void | addRenderable (Renderable *pRend, uint8 groupID, ushort priority)
| Add a renderable object to the queue. More...
void | addRenderable (Renderable *pRend, uint8 groupId)
| Add a renderable object to the queue. More...
void | addRenderable (Renderable *pRend)
| Add a renderable object to the queue. More...
void | clear (bool destroyPassMaps=false)
| Empty the queue - should only be called by SceneManagers. More...
uint8 | 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. More...
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. More...
RenderQueueGroup * | getQueueGroup (uint8 qid)
| Get a render queue group. More...
RenderableListener * | getRenderableListener (void) const
bool | getShadowCastersCannotBeReceivers (void) const
| Gets whether or not objects which cast shadows should be treated as never receiving shadows. More...
bool | getSplitNoShadowPasses (void) const
| Gets 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. More...
bool | getSplitPassesByLightingType (void) const
| Gets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal. More...
void | merge (const RenderQueue *rhs)
| Merge render queue. More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, void *)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz)
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void * | operator new[] (size_t sz)
void | processVisibleObject (MovableObject *mo, Camera *cam, bool onlyShadowCasters, VisibleObjectsBoundsInfo *visibleBounds)
| Utility method to perform the standard actions associated with getting a visible object to add itself to the queue. More...
void | setDefaultQueueGroup (uint8 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. More...
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. More...
void | setRenderableListener (RenderableListener *listener)
| Set a renderable listener on the queue. More...
void | setShadowCastersCannotBeReceivers (bool ind)
| Sets whether or not objects which cast shadows should be treated as never receiving shadows. More...
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. More...
void | setSplitPassesByLightingType (bool split)
| Sets whether or not the queue will split passes by their lighting type, ie ambient, per-light and decal. More...

## Protected Attributes

uint8 | mDefaultQueueGroup
| The current default queue group. More...
ushort | mDefaultRenderablePriority
| The default priority. More...
RenderQueueGroupMap | mGroups
RenderableListener * | mRenderableListener
bool | mShadowCastersCannotBeReceivers
bool | mSplitNoShadowPasses
bool | mSplitPassesByLightingType

## 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 92 of file OgreRenderQueue.h.

## Member Typedef Documentation

## ConstQueueGroupIterator

typedef ConstMapIterator<RenderQueueGroupMap> Ogre::RenderQueue::ConstQueueGroupIterator

Definition at line 99 of file OgreRenderQueue.h.

## QueueGroupIterator

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

Iterator over queue groups.

Definition at line 98 of file OgreRenderQueue.h.

## RenderQueueGroupMap

typedef map< uint8, RenderQueueGroup* >::type Ogre::RenderQueue::RenderQueueGroupMap

Definition at line 96 of file OgreRenderQueue.h.

## Constructor & Destructor Documentation

## RenderQueue()

Ogre::RenderQueue::RenderQueue | ( |  | ) |

## ~RenderQueue()

virtual Ogre::RenderQueue::~RenderQueue | ( |  | ) |

virtual

## Member Function Documentation

## _getQueueGroupIterator() [1/2]

QueueGroupIterator Ogre::RenderQueue::_getQueueGroupIterator | ( | void |  | ) |

Internal method, returns an iterator for the queue groups.

## _getQueueGroupIterator() [2/2]

ConstQueueGroupIterator Ogre::RenderQueue::_getQueueGroupIterator | ( | void |  | ) | const

## addRenderable() [1/3]

void Ogre::RenderQueue::addRenderable | ( | Renderable * | pRend,
|  | uint8 | 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.

## addRenderable() [2/3]

void Ogre::RenderQueue::addRenderable | ( | Renderable * | pRend,
|  | uint8 | 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.

## addRenderable() [3/3]

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

## clear()

void Ogre::RenderQueue::clear | ( | bool | destroyPassMaps = `false` | ) |

Empty the queue - should only be called by SceneManagers.

Parameters

  destroyPassMaps | Set to true to destroy all pass maps so that the queue is completely clean (useful when switching scene managers)

## getDefaultQueueGroup()

uint8 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.

## getDefaultRenderablePriority()

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.

## getQueueGroup()

RenderQueueGroup* Ogre::RenderQueue::getQueueGroup | ( | uint8 | 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.

## getRenderableListener()

RenderableListener* Ogre::RenderQueue::getRenderableListener | ( | void |  | ) | const

Definition at line 286 of file OgreRenderQueue.h.

## getShadowCastersCannotBeReceivers()

bool Ogre::RenderQueue::getShadowCastersCannotBeReceivers | ( | void |  | ) | const

Gets whether or not objects which cast shadows should be treated as never receiving shadows.

## getSplitNoShadowPasses()

bool Ogre::RenderQueue::getSplitNoShadowPasses | ( | void |  | ) | const

Gets 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.

## getSplitPassesByLightingType()

bool Ogre::RenderQueue::getSplitPassesByLightingType | ( | void |  | ) | const

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

## merge()

void Ogre::RenderQueue::merge | ( | const RenderQueue * | rhs | ) |

Merge render queue.

## operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |

inherited

Definition at line 96 of file OgreMemoryAllocatedObject.h.

## operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |

inherited

Definition at line 102 of file OgreMemoryAllocatedObject.h.

## operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 108 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |

inherited

Definition at line 113 of file OgreMemoryAllocatedObject.h.

## operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |

inherited

Definition at line 119 of file OgreMemoryAllocatedObject.h.

## operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

operator new, with debug line info

Definition at line 68 of file OgreMemoryAllocatedObject.h.

## operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |

inherited

Definition at line 73 of file OgreMemoryAllocatedObject.h.

## operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |

inherited

placement operator new

Definition at line 79 of file OgreMemoryAllocatedObject.h.

## operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |

inherited

array operator new, with debug line info

Definition at line 86 of file OgreMemoryAllocatedObject.h.

## operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |

inherited

Definition at line 91 of file OgreMemoryAllocatedObject.h.

## processVisibleObject()

void Ogre::RenderQueue::processVisibleObject | ( | MovableObject * | mo,
|  | Camera * | cam,
|  | bool | onlyShadowCasters,
|  | VisibleObjectsBoundsInfo * | visibleBounds
| ) |  |

Utility method to perform the standard actions associated with getting a visible object to add itself to the queue.

This is a replacement for SceneManager implementations of the associated tasks related to calling MovableObject::_updateRenderQueue.

## setDefaultQueueGroup()

void Ogre::RenderQueue::setDefaultQueueGroup | ( | uint8 | 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.

See the enum RenderQueueGroupID for what kind of values can be used here.

## setDefaultRenderablePriority()

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.

## setRenderableListener()

void Ogre::RenderQueue::setRenderableListener | ( | RenderableListener * | listener | ) |

Set a renderable listener on the queue.

Remarks
  There can only be a single renderable listener on the queue, since that listener has complete control over the techniques in use.

Definition at line 283 of file OgreRenderQueue.h.

## setShadowCastersCannotBeReceivers()

void Ogre::RenderQueue::setShadowCastersCannotBeReceivers | ( | bool | ind | ) |

Sets whether or not objects which cast shadows should be treated as never receiving shadows.

## setSplitNoShadowPasses()

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.

## setSplitPassesByLightingType()

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.

## Member Data Documentation

## mDefaultQueueGroup

uint8 Ogre::RenderQueue::mDefaultQueueGroup

protected

The current default queue group.

Definition at line 137 of file OgreRenderQueue.h.

## mDefaultRenderablePriority

ushort Ogre::RenderQueue::mDefaultRenderablePriority

protected

The default priority.

Definition at line 139 of file OgreRenderQueue.h.

## mGroups

RenderQueueGroupMap Ogre::RenderQueue::mGroups

protected

Definition at line 135 of file OgreRenderQueue.h.

## mRenderableListener

RenderableListener* Ogre::RenderQueue::mRenderableListener

protected

Definition at line 145 of file OgreRenderQueue.h.

## mShadowCastersCannotBeReceivers

bool Ogre::RenderQueue::mShadowCastersCannotBeReceivers

protected

Definition at line 143 of file OgreRenderQueue.h.

## mSplitNoShadowPasses

bool Ogre::RenderQueue::mSplitNoShadowPasses

protected

Definition at line 142 of file OgreRenderQueue.h.

## mSplitPassesByLightingType

bool Ogre::RenderQueue::mSplitPassesByLightingType

protected

Definition at line 141 of file OgreRenderQueue.h.

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

- OgreRenderQueue.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.