OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreRenderTargetListener.h
Go to the documentation of this file.
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-2014 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __RenderTargetListener_H__
29 #define __RenderTargetListener_H__
30 
31 
32 #include "OgrePrerequisites.h"
33 
34 namespace Ogre {
35 
45  {
48  };
49 
53  {
56  };
57 
78  {
79  /*
80  Note that this could have been an abstract class, but I made
81  the explicit choice not to do this, because I wanted to give
82  people the option of only implementing the methods they wanted,
83  rather than having to create 'do nothing' implementations for
84  those they weren't interested in. As such this class follows
85  the 'Adapter' classes in Java rather than pure interfaces.
86  */
87  public:
88  virtual ~RenderTargetListener() {}
100  virtual void preRenderTargetUpdate(const RenderTargetEvent& evt)
101  { (void)evt; }
102 
111  virtual void postRenderTargetUpdate(const RenderTargetEvent& evt)
112  { (void)evt; }
113 
114  /* Called just before a Viewport on a RenderTarget is to be updated.
115  @remarks
116  This method is called before each viewport on the RenderTarget is
117  rendered to. You can use this to perform per-viewport settings changes,
118  such as showing / hiding particular overlays.
119  */
121  { (void)evt; }
122 
123  /* Called just after a Viewport on a RenderTarget is to be updated.
124  @remarks
125  This method is called after each viewport on the RenderTarget is
126  rendered to.
127  */
129  { (void)evt; }
130 
134  virtual void viewportAdded(const RenderTargetViewportEvent& evt)
135  { (void)evt; }
140  { (void)evt; }
141  };
144 }
145 
146 #endif
A 'canvas' which can receive the results of a rendering operation.
#define _OgreExport
Definition: OgrePlatform.h:260
Struct containing information about a RenderTarget Viewport-specific event.
virtual void postRenderTargetUpdate(const RenderTargetEvent &evt)
Called just after a RenderTarget has been rendered to.
virtual void preRenderTargetUpdate(const RenderTargetEvent &evt)
Called just before a RenderTarget is about to be rendered into.
RenderTarget * source
The source of the event being raised.
Struct containing information about a RenderTarget event.
virtual void viewportAdded(const RenderTargetViewportEvent &evt)
Called to notify listener that a Viewport has been added to the target in question.
virtual void postViewportUpdate(const RenderTargetViewportEvent &evt)
A interface class defining a listener which can be used to receive notifications of RenderTarget even...
virtual void preViewportUpdate(const RenderTargetViewportEvent &evt)
An abstraction of a viewport, i.e.
Definition: OgreViewport.h:57
virtual void viewportRemoved(const RenderTargetViewportEvent &evt)
Called to notify listener that a Viewport has been removed from the target in question.
Viewport * source
The source of the event being raised.