[692] | 1 | /*
|
---|
| 2 | -----------------------------------------------------------------------------
|
---|
| 3 | This source file is part of OGRE
|
---|
| 4 | (Object-oriented Graphics Rendering Engine)
|
---|
| 5 | For the latest info, see http://www.ogre3d.org/
|
---|
| 6 |
|
---|
| 7 | Copyright (c) 2000-2005 The OGRE Team
|
---|
| 8 | Also see acknowledgements in Readme.html
|
---|
| 9 |
|
---|
| 10 | This program is free software; you can redistribute it and/or modify it under
|
---|
| 11 | the terms of the GNU Lesser General Public License as published by the Free Software
|
---|
| 12 | Foundation; either version 2 of the License, or (at your option) any later
|
---|
| 13 | version.
|
---|
| 14 |
|
---|
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT
|
---|
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
---|
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
|
---|
| 18 |
|
---|
| 19 | You should have received a copy of the GNU Lesser General Public License along with
|
---|
| 20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple
|
---|
| 21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to
|
---|
| 22 | http://www.gnu.org/copyleft/lesser.txt.
|
---|
| 23 | -----------------------------------------------------------------------------
|
---|
| 24 | */
|
---|
| 25 | #ifndef __RenderQueueListener_H__
|
---|
| 26 | #define __RenderQueueListener_H__
|
---|
| 27 |
|
---|
| 28 | #include "OgrePrerequisites.h"
|
---|
| 29 | #include "OgreRenderQueue.h"
|
---|
| 30 |
|
---|
| 31 | namespace Ogre {
|
---|
| 32 |
|
---|
| 33 | /** Abstract interface which classes must implement if they wish to receive
|
---|
| 34 | events from the render queue.
|
---|
| 35 | @remarks
|
---|
| 36 | The OGRE render queue is divided into several queue groups, as defined by
|
---|
| 37 | uint8. A class may implement this interface, and register itself
|
---|
| 38 | as a listener by calling SceneManager::addRenderQueueListener. After doing so,
|
---|
| 39 | the class will receive an event before and after each queue group is sent to
|
---|
| 40 | the rendering system.
|
---|
| 41 | @par
|
---|
| 42 | The event listeners have an option to make a queue either be skipped, or to repeat.
|
---|
| 43 | Note that if multiple listeners are registered, the one registered last has the final
|
---|
| 44 | say, although options set by previous listeners will not be changed if the latest
|
---|
| 45 | does not express a preference.
|
---|
| 46 | */
|
---|
| 47 | class _OgreExport RenderQueueListener
|
---|
| 48 | {
|
---|
| 49 | public:
|
---|
| 50 | virtual ~RenderQueueListener() {}
|
---|
| 51 | /** Event raised before a queue group is rendered.
|
---|
| 52 | @remarks
|
---|
| 53 | This method is called by the SceneManager before each queue group is
|
---|
| 54 | rendered.
|
---|
| 55 | @param queueGroupId The id of the queue group which is about to be rendered
|
---|
| 56 | @param invocation Name of the invocation which is causing this to be
|
---|
| 57 | called (@see RenderQueueInvocation)
|
---|
| 58 | @param skipThisInvocation A boolean passed by reference which is by default set to
|
---|
| 59 | false. If the event sets this to true, the queue will be skipped and not
|
---|
| 60 | rendered. Note that in this case the renderQueueEnded event will not be raised
|
---|
| 61 | for this queue group.
|
---|
| 62 | */
|
---|
| 63 | virtual void renderQueueStarted(uint8 queueGroupId, const String& invocation,
|
---|
| 64 | bool& skipThisInvocation) = 0;
|
---|
| 65 |
|
---|
| 66 | /** Event raised after a queue group is rendered.
|
---|
| 67 | @remarks
|
---|
| 68 | This method is called by the SceneManager after each queue group is
|
---|
| 69 | rendered.
|
---|
| 70 | @param queueGroupId The id of the queue group which has just been rendered
|
---|
| 71 | @param invocation Name of the invocation which is causing this to be
|
---|
| 72 | called (@see RenderQueueInvocation)
|
---|
| 73 | @param repeatThisInvocation A boolean passed by reference which is by default set to
|
---|
| 74 | false. If the event sets this to true, the queue which has just been
|
---|
| 75 | rendered will be repeated, and the renderQueueStarted and renderQueueEnded
|
---|
| 76 | events will also be fired for it again.
|
---|
| 77 | */
|
---|
| 78 | virtual void renderQueueEnded(uint8 queueGroupId, const String& invocation,
|
---|
| 79 | bool& repeatThisInvocation) = 0;
|
---|
| 80 | };
|
---|
| 81 |
|
---|
| 82 | }
|
---|
| 83 |
|
---|
| 84 | #endif
|
---|
| 85 |
|
---|