OgreRenderQueue.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __RenderQueue_H__
#define __RenderQueue_H__
#include "OgrePrerequisites.h"
#include "OgreIteratorWrappers.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class Camera;
class MovableObject;
struct VisibleObjectsBoundsInfo;
enum RenderQueueGroupID
{
RENDER_QUEUE_BACKGROUND = 0,
RENDER_QUEUE_SKIES_EARLY = 5,
RENDER_QUEUE_1 = 10,
RENDER_QUEUE_2 = 20,
RENDER_QUEUE_WORLD_GEOMETRY_1 = 25,
RENDER_QUEUE_3 = 30,
RENDER_QUEUE_4 = 40,
RENDER_QUEUE_MAIN = 50,
RENDER_QUEUE_6 = 60,
RENDER_QUEUE_7 = 70,
RENDER_QUEUE_WORLD_GEOMETRY_2 = 75,
RENDER_QUEUE_8 = 80,
RENDER_QUEUE_9 = 90,
RENDER_QUEUE_SKIES_LATE = 95,
RENDER_QUEUE_OVERLAY = 100,
RENDER_QUEUE_MAX = 105
};
#define OGRE_RENDERABLE_DEFAULT_PRIORITY 100
class _OgreExport RenderQueue : public RenderQueueAlloc
{
public:
typedef map< uint8, RenderQueueGroup* >::type RenderQueueGroupMap;
typedef MapIterator<RenderQueueGroupMap> QueueGroupIterator;
typedef ConstMapIterator<RenderQueueGroupMap> ConstQueueGroupIterator;
class _OgreExport RenderableListener
{
public:
RenderableListener() {}
virtual ~RenderableListener() {}
virtual bool renderableQueued(Renderable* rend, uint8 groupID,
ushort priority, Technique** ppTech, RenderQueue* pQueue) = 0;
};
protected:
RenderQueueGroupMap mGroups;
uint8 mDefaultQueueGroup;
ushort mDefaultRenderablePriority;
bool mSplitPassesByLightingType;
bool mSplitNoShadowPasses;
bool mShadowCastersCannotBeReceivers;
RenderableListener* mRenderableListener;
public:
RenderQueue();
virtual ~RenderQueue();
void clear(bool destroyPassMaps = false);
RenderQueueGroup* getQueueGroup(uint8 qid);
void addRenderable(Renderable* pRend, uint8 groupID, ushort priority);
void addRenderable(Renderable* pRend, uint8 groupId);
void addRenderable(Renderable* pRend);
uint8 getDefaultQueueGroup(void) const;
void setDefaultRenderablePriority(ushort priority);
ushort getDefaultRenderablePriority(void) const;
void setDefaultQueueGroup(uint8 grp);
QueueGroupIterator _getQueueGroupIterator(void);
ConstQueueGroupIterator _getQueueGroupIterator(void) const;
void setSplitPassesByLightingType(bool split);
bool getSplitPassesByLightingType(void) const;
void setSplitNoShadowPasses(bool split);
bool getSplitNoShadowPasses(void) const;
void setShadowCastersCannotBeReceivers(bool ind);
bool getShadowCastersCannotBeReceivers(void) const;
void setRenderableListener(RenderableListener* listener)
{ mRenderableListener = listener; }
RenderableListener* getRenderableListener(void) const
{ return mRenderableListener; }
void merge( const RenderQueue* rhs );
void processVisibleObject(MovableObject* mo,
Camera* cam,
bool onlyShadowCasters,
VisibleObjectsBoundsInfo* visibleBounds);
};
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::RenderQueue::mSplitNoShadowPasses
bool mSplitNoShadowPasses
Definition: OgreRenderQueue.h:142
Ogre::RENDER_QUEUE_WORLD_GEOMETRY_1
Definition: OgreRenderQueue.h:61
Ogre::Renderable
Abstract class defining the interface all renderable objects must implement.
Definition: OgreRenderable.h:63
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:60
Ogre::RenderQueue::RenderableListener::~RenderableListener
virtual ~RenderableListener()
Definition: OgreRenderQueue.h:110
Ogre::RenderQueue::RenderQueueGroupMap
map< uint8, RenderQueueGroup *>::type RenderQueueGroupMap
Definition: OgreRenderQueue.h:96
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
Ogre::RenderQueue::mDefaultRenderablePriority
ushort mDefaultRenderablePriority
The default priority.
Definition: OgreRenderQueue.h:139
Ogre::ConstMapIterator
Concrete IteratorWrapper for const access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:352
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:92
Ogre::RENDER_QUEUE_8
Definition: OgreRenderQueue.h:69
Ogre::RenderQueue::ConstQueueGroupIterator
ConstMapIterator< RenderQueueGroupMap > ConstQueueGroupIterator
Definition: OgreRenderQueue.h:99
Ogre::RenderQueueGroupID
RenderQueueGroupID
Enumeration of queue groups, by which the application may group queued renderables so that they are r...
Definition: OgreRenderQueue.h:53
OgrePrerequisites.h
Ogre::RenderQueueGroup
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
Definition: OgreRenderQueueSortingGrouping.h:465
Ogre::RenderQueue::mGroups
RenderQueueGroupMap mGroups
Definition: OgreRenderQueue.h:135
Ogre::RenderQueue::mSplitPassesByLightingType
bool mSplitPassesByLightingType
Definition: OgreRenderQueue.h:141
Ogre::RenderQueue::mRenderableListener
RenderableListener * mRenderableListener
Definition: OgreRenderQueue.h:145
Ogre::RENDER_QUEUE_4
Definition: OgreRenderQueue.h:63
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::RenderQueue::RenderableListener
Class to listen in on items being added to the render queue.
Definition: OgreRenderQueue.h:106
Ogre::RenderQueue::mShadowCastersCannotBeReceivers
bool mShadowCastersCannotBeReceivers
Definition: OgreRenderQueue.h:143
Ogre::VisibleObjectsBoundsInfo
Structure collecting together information about the visible objects that have been discovered in a sc...
Definition: OgreSceneManager.h:86
Ogre::RENDER_QUEUE_2
Definition: OgreRenderQueue.h:60
Ogre::RENDER_QUEUE_MAX
Final possible render queue, don&#39;t exceed this.
Definition: OgreRenderQueue.h:76
Ogre::RenderQueue::getRenderableListener
RenderableListener * getRenderableListener(void) const
Definition: OgreRenderQueue.h:286
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:86
OgreHeaderSuffix.h
Ogre::RenderQueue::setRenderableListener
void setRenderableListener(RenderableListener *listener)
Set a renderable listener on the queue.
Definition: OgreRenderQueue.h:283
Ogre::RENDER_QUEUE_BACKGROUND
Use this queue for objects which must be rendered first e.g. backgrounds.
Definition: OgreRenderQueue.h:56
Ogre::RENDER_QUEUE_6
Definition: OgreRenderQueue.h:66
OgreIteratorWrappers.h
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::RENDER_QUEUE_7
Definition: OgreRenderQueue.h:67
Ogre::RENDER_QUEUE_SKIES_EARLY
First queue (after backgrounds), used for skyboxes if rendered first.
Definition: OgreRenderQueue.h:58
Ogre::RENDER_QUEUE_OVERLAY
Use this queue for objects which must be rendered last e.g. overlays.
Definition: OgreRenderQueue.h:74
Ogre::RenderQueue::QueueGroupIterator
MapIterator< RenderQueueGroupMap > QueueGroupIterator
Iterator over queue groups.
Definition: OgreRenderQueue.h:98
OgreHeaderPrefix.h
Ogre::RENDER_QUEUE_MAIN
The default render queue.
Definition: OgreRenderQueue.h:65
Ogre::RenderQueue::mDefaultQueueGroup
uint8 mDefaultQueueGroup
The current default queue group.
Definition: OgreRenderQueue.h:137
Ogre::Technique
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:53
Ogre::RENDER_QUEUE_SKIES_LATE
Penultimate queue(before overlays), used for skyboxes if rendered last.
Definition: OgreRenderQueue.h:72
Ogre::RENDER_QUEUE_WORLD_GEOMETRY_2
Definition: OgreRenderQueue.h:68
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::RENDER_QUEUE_1
Definition: OgreRenderQueue.h:59
Ogre::RENDER_QUEUE_9
Definition: OgreRenderQueue.h:70
Ogre::RenderQueue::RenderableListener::RenderableListener
RenderableListener()
Definition: OgreRenderQueue.h:109
Ogre::RENDER_QUEUE_3
Definition: OgreRenderQueue.h:62
Ogre::AllocatedObject
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
Definition: OgreMemoryAllocatedObject.h:58

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