source: GTP/trunk/App/Demos/Geom/OgreStuff/include/OgreRenderQueueListener.h @ 1030

Revision 1030, 3.5 KB checked in by gumbau, 18 years ago (diff)

Ogre Stuff initial import

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-2005 The OGRE Team
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-----------------------------------------------------------------------------
24*/
25#ifndef __RenderQueueListener_H__
26#define __RenderQueueListener_H__
27
28#include "OgrePrerequisites.h"
29#include "OgreRenderQueue.h"
30
31namespace 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        RenderQueueGroupID. 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        /** Event raised before a queue group is rendered.
51        @remarks
52            This method is called by the SceneManager before each queue group is
53            rendered.
54            @param id The id of the queue group which is about to be rendered
55            @param skipThisQueue A boolean passed by reference which is by default set to
56                false. If the event sets this to true, the queue will be skipped and not
57                rendered. Note that in this case the renderQueueEnded event will not be raised
58                for this queue group.
59        */
60        virtual void renderQueueStarted(RenderQueueGroupID id, bool& skipThisQueue) = 0;
61        /** Event raised after a queue group is rendered.
62        @remarks
63            This method is called by the SceneManager after each queue group is
64            rendered.
65            @param id The id of the queue group which has just been rendered
66            @param repeatThisQueue A boolean passed by reference which is by default set to
67                false. If the event sets this to true, the queue which has just been
68                rendered will be repeated, and the renderQueueStarted and renderQueueEnded
69                events will also be fired for it again.
70        */
71        virtual void renderQueueEnded(RenderQueueGroupID id, bool& repeatThisQueue) = 0;
72    };
73
74}
75
76#endif
77
Note: See TracBrowser for help on using the repository browser.