OGRE  1.9
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreCompositor.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 __Compositor_H__
29 #define __Compositor_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreIteratorWrappers.h"
33 #include "OgreResource.h"
34 #include "OgreTexture.h"
35 #include "OgreHeaderPrefix.h"
36 
37 namespace Ogre {
51  {
52  public:
53  Compositor(ResourceManager* creator, const String& name, ResourceHandle handle,
54  const String& group, bool isManual = false, ManualResourceLoader* loader = 0);
55  ~Compositor();
56 
60 
63  CompositionTechnique *createTechnique();
64 
67  void removeTechnique(size_t idx);
68 
71  CompositionTechnique *getTechnique(size_t idx);
72 
75  size_t getNumTechniques();
76 
79  void removeAllTechniques();
80 
82  TechniqueIterator getTechniqueIterator(void);
83 
90  CompositionTechnique *getSupportedTechnique(size_t idx);
91 
98  size_t getNumSupportedTechniques();
99 
106  TechniqueIterator getSupportedTechniqueIterator(void);
107 
115  CompositionTechnique *getSupportedTechnique(const String& schemeName = StringUtil::BLANK);
116 
122  const String& getTextureInstanceName(const String& name, size_t mrtIndex);
123 
129  TexturePtr getTextureInstance(const String& name, size_t mrtIndex);
130 
137  RenderTarget* getRenderTarget(const String& name);
138 
139  protected:
141  void loadImpl(void);
142 
144  void unloadImpl(void);
146  size_t calculateSize(void) const;
147 
150  void compile();
151  private:
154 
159 
162  void createGlobalTextures();
163 
166  void freeGlobalTextures();
167 
168  //TODO GSOC : These typedefs are duplicated from CompositorInstance. Solve?
175  };
178 }
179 
180 #include "OgreHeaderSuffix.h"
181 
182 #endif
Techniques mSupportedTechniques
A 'canvas' which can receive the results of a rendering operation.
#define _OgreExport
Definition: OgrePlatform.h:260
vector< CompositionTechnique * >::type Techniques
Data types for internal lists.
map< String, MultiRenderTarget * >::type GlobalMRTMap
Store a list of MRTs we've created.
Interface describing a manual resource loader.
Definition: OgreResource.h:514
Class representing a Compositor object.
GlobalTextureMap mGlobalTextures
Techniques mTechniques
VectorIterator< Techniques > TechniqueIterator
Base composition technique, can be subclassed in plugins.
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:79
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreString.h:196
map< String, TexturePtr >::type GlobalTextureMap
Map from name->local texture.
bool mCompilationRequired
Compilation required This is set if the techniques change and the supportedness of techniques has to ...
Defines a generic resource handler.
_StringBase String
Concrete IteratorWrapper for nonconst access to the underlying container.
GlobalMRTMap mGlobalMRTs