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-2013 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 {
50  class _OgreExport Compositor: public Resource
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
OgreHeaderSuffix.h
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::Compositor
Class representing a Compositor object.
Definition: OgreCompositor.h:50
Ogre::Compositor::GlobalTextureMap
map< String, TexturePtr >::type GlobalTextureMap
Map from name->local texture.
Definition: OgreCompositor.h:170
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Compositor::mGlobalTextures
GlobalTextureMap mGlobalTextures
Definition: OgreCompositor.h:171
Ogre::Compositor::mTechniques
Techniques mTechniques
Definition: OgreCompositor.h:152
Ogre::CompositionTechnique
Base composition technique, can be subclassed in plugins.
Definition: OgreCompositionTechnique.h:45
Ogre::Compositor::Techniques
vector< CompositionTechnique * >::type Techniques
Data types for internal lists.
Definition: OgreCompositor.h:58
Ogre::Compositor::mCompilationRequired
bool mCompilationRequired
Compilation required This is set if the techniques change and the supportedness of techniques has to ...
Definition: OgreCompositor.h:158
Ogre::StringUtil::BLANK
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreString.h:196
OgreHeaderPrefix.h
Ogre::RenderTarget
A 'canvas' which can receive the results of a rendering operation.
Definition: OgreRenderTarget.h:65
Ogre::Compositor::mSupportedTechniques
Techniques mSupportedTechniques
Definition: OgreCompositor.h:153
OgrePrerequisites.h
Ogre::Compositor::GlobalMRTMap
map< String, MultiRenderTarget * >::type GlobalMRTMap
Store a list of MRTs we've created.
Definition: OgreCompositor.h:173
OgreTexture.h
Ogre::Compositor::mGlobalMRTs
GlobalMRTMap mGlobalMRTs
Definition: OgreCompositor.h:174
OgreResource.h
Ogre::ResourceManager
Defines a generic resource handler.
Definition: OgreResourceManager.h:122
Ogre::SharedPtr< Texture >
OgreIteratorWrappers.h
Ogre::Resource
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:79
Ogre::Compositor::TechniqueIterator
VectorIterator< Techniques > TechniqueIterator
Definition: OgreCompositor.h:59
Ogre::vector
Definition: OgrePrerequisites.h:491
Ogre::ManualResourceLoader
Interface describing a manual resource loader.
Definition: OgreResource.h:514

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15