OGRE  1.9.0
OgreRenderQueue.h
Go to the documentation of this file.
1/*
2-----------------------------------------------------------------------------
3This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5For the latest info, see http://www.ogre3d.org/
6
7Copyright (c) 2000-2014 Torus Knot Software Ltd
8
9Permission is hereby granted, free of charge, to any person obtaining a copy
10of this software and associated documentation files (the "Software"), to deal
11in the Software without restriction, including without limitation the rights
12to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13copies of the Software, and to permit persons to whom the Software is
14furnished to do so, subject to the following conditions:
15
16The above copyright notice and this permission notice shall be included in
17all copies or substantial portions of the Software.
18
19THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25THE SOFTWARE.
26-----------------------------------------------------------------------------
27*/
28#ifndef __RenderQueue_H__
29#define __RenderQueue_H__
30
31#include "OgrePrerequisites.h"
33#include "OgreHeaderPrefix.h"
34
35namespace Ogre {
36
37 class Camera;
38 class MovableObject;
39 struct VisibleObjectsBoundsInfo;
40
54 {
77 };
78
79 #define OGRE_RENDERABLE_DEFAULT_PRIORITY 100
80
93 {
94 public:
95
100
107 {
108 public:
111
131 virtual bool renderableQueued(Renderable* rend, uint8 groupID,
132 ushort priority, Technique** ppTech, RenderQueue* pQueue) = 0;
133 };
134 protected:
140
144
146 public:
148 virtual ~RenderQueue();
149
154 void clear(bool destroyPassMaps = false);
155
162
185 void addRenderable(Renderable* pRend, uint8 groupID, ushort priority);
186
204 void addRenderable(Renderable* pRend, uint8 groupId);
205
219
224
230
235
241
245
250
255
260 void setSplitNoShadowPasses(bool split);
261
266 bool getSplitNoShadowPasses(void) const;
267
272
277
284 { mRenderableListener = listener; }
285
287 { return mRenderableListener; }
288
291 void merge( const RenderQueue* rhs );
298 Camera* cam,
299 bool onlyShadowCasters,
300 VisibleObjectsBoundsInfo* visibleBounds);
301
302 };
303
307}
308
309#include "OgreHeaderSuffix.h"
310
311#endif
#define _OgreExport
Definition: OgrePlatform.h:260
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Concrete IteratorWrapper for const access to the underlying key-value container.
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Abstract class defining a movable object in a scene.
A grouping level underneath RenderQueue which groups renderables to be issued at coarsely the same ti...
Class to listen in on items being added to the render queue.
virtual bool renderableQueued(Renderable *rend, uint8 groupID, ushort priority, Technique **ppTech, RenderQueue *pQueue)=0
Method called when a Renderable is added to the queue.
Class to manage the scene object rendering queue.
void setSplitPassesByLightingType(bool split)
Sets whether or not the queue will split passes by their lighting type, ie ambient,...
virtual ~RenderQueue()
void setRenderableListener(RenderableListener *listener)
Set a renderable listener on the queue.
MapIterator< RenderQueueGroupMap > QueueGroupIterator
Iterator over queue groups.
void setSplitNoShadowPasses(bool split)
Sets whether or not the queue will split passes which have shadow receive turned off (in their parent...
bool getSplitPassesByLightingType(void) const
Gets whether or not the queue will split passes by their lighting type, ie ambient,...
void merge(const RenderQueue *rhs)
Merge render queue.
bool getSplitNoShadowPasses(void) const
Gets whether or not the queue will split passes which have shadow receive turned off (in their parent...
QueueGroupIterator _getQueueGroupIterator(void)
Internal method, returns an iterator for the queue groups.
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...
uint8 mDefaultQueueGroup
The current default queue group.
void clear(bool destroyPassMaps=false)
Empty the queue - should only be called by SceneManagers.
void addRenderable(Renderable *pRend, uint8 groupId)
Add a renderable object to the queue.
ushort getDefaultRenderablePriority(void) const
Gets the current default renderable priority, which will be used for all renderables which do not spe...
uint8 getDefaultQueueGroup(void) const
Gets the current default queue group, which will be used for all renderable which do not specify whic...
void setShadowCastersCannotBeReceivers(bool ind)
Sets whether or not objects which cast shadows should be treated as never receiving shadows.
RenderQueueGroupMap mGroups
map< uint8, RenderQueueGroup * >::type RenderQueueGroupMap
bool mShadowCastersCannotBeReceivers
RenderQueueGroup * getQueueGroup(uint8 qid)
Get a render queue group.
RenderableListener * getRenderableListener(void) const
void addRenderable(Renderable *pRend)
Add a renderable object to the queue.
bool getShadowCastersCannotBeReceivers(void) const
Gets whether or not objects which cast shadows should be treated as never receiving shadows.
ConstQueueGroupIterator _getQueueGroupIterator(void) const
RenderableListener * mRenderableListener
ConstMapIterator< RenderQueueGroupMap > ConstQueueGroupIterator
void setDefaultRenderablePriority(ushort priority)
Sets the current default renderable priority, which will be used for all renderables which do not spe...
void addRenderable(Renderable *pRend, uint8 groupID, ushort priority)
Add a renderable object to the queue.
void setDefaultQueueGroup(uint8 grp)
Sets the current default queue group, which will be used for all renderable which do not specify whic...
ushort mDefaultRenderablePriority
The default priority.
Abstract class defining the interface all renderable objects must implement.
Class representing an approach to rendering this particular Material.
Definition: OgreTechnique.h:54
RenderQueueGroupID
Enumeration of queue groups, by which the application may group queued renderables so that they are r...
@ RENDER_QUEUE_WORLD_GEOMETRY_2
@ RENDER_QUEUE_MAX
Final possible render queue, don't exceed this.
@ RENDER_QUEUE_8
@ RENDER_QUEUE_OVERLAY
Use this queue for objects which must be rendered last e.g. overlays.
@ RENDER_QUEUE_6
@ RENDER_QUEUE_SKIES_LATE
Penultimate queue(before overlays), used for skyboxes if rendered last.
@ RENDER_QUEUE_2
@ RENDER_QUEUE_9
@ RENDER_QUEUE_BACKGROUND
Use this queue for objects which must be rendered first e.g. backgrounds.
@ RENDER_QUEUE_3
@ RENDER_QUEUE_1
@ RENDER_QUEUE_SKIES_EARLY
First queue (after backgrounds), used for skyboxes if rendered first.
@ RENDER_QUEUE_4
@ RENDER_QUEUE_7
@ RENDER_QUEUE_WORLD_GEOMETRY_1
@ RENDER_QUEUE_MAIN
The default render queue.
unsigned char uint8
Definition: OgrePlatform.h:346
unsigned short ushort
Structure collecting together information about the visible objects that have been discovered in a sc...
std::map< K, V, P, A > type