Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/OgreMain/include/OgreRenderQueueListener.h @ 3

Last change on this file since 3 was 3, checked in by anonymous, 17 years ago

=update

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