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 {
51  {
52  public:
53  Compositor(ResourceManager* creator, const String& name, ResourceHandle handle,
54  const String& group, bool isManual = false, ManualResourceLoader* loader = 0);
56 
60 
64 
67  void removeTechnique(size_t idx);
68 
72 
75  size_t getNumTechniques();
76 
80 
83 
91 
99 
107 
116 
122  const String& getTextureInstanceName(const String& name, size_t mrtIndex);
123 
129  TexturePtr getTextureInstance(const String& name, size_t mrtIndex);
130 
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 
163 
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::Compositor::getTechniqueIterator
TechniqueIterator getTechniqueIterator(void)
Get an iterator over the Techniques in this compositor.
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Compositor::getNumSupportedTechniques
size_t getNumSupportedTechniques()
Get the number of supported techniques.
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::Compositor
Class representing a Compositor object.
Definition: OgreCompositor.h:51
Ogre::Compositor::GlobalTextureMap
map< String, TexturePtr >::type GlobalTextureMap
Map from name->local texture.
Definition: OgreCompositor.h:170
Ogre::Compositor::freeGlobalTextures
void freeGlobalTextures()
Destroy global rendertextures.
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::Compositor::removeTechnique
void removeTechnique(size_t idx)
Remove a technique.
Ogre::Compositor::unloadImpl
void unloadImpl(void)
Internal implementation of the 'unload' action; called regardless of whether this resource is being l...
Ogre::Compositor::calculateSize
size_t calculateSize(void) const
Calculate the size of a resource; this will only be called after 'load'.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Compositor::createTechnique
CompositionTechnique * createTechnique()
Create a new technique, and return a pointer to it.
Ogre::Compositor::mGlobalTextures
GlobalTextureMap mGlobalTextures
Definition: OgreCompositor.h:171
Ogre::Compositor::createGlobalTextures
void createGlobalTextures()
Create global rendertextures.
Ogre::Compositor::mTechniques
Techniques mTechniques
Definition: OgreCompositor.h:152
Ogre::CompositionTechnique
Base composition technique, can be subclassed in plugins.
Definition: OgreCompositionTechnique.h:46
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::Compositor::getTextureInstanceName
const String & getTextureInstanceName(const String &name, size_t mrtIndex)
Get the instance name for a global texture.
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:66
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::Compositor
Compositor(ResourceManager *creator, const String &name, ResourceHandle handle, const String &group, bool isManual=false, ManualResourceLoader *loader=0)
Ogre::Compositor::getSupportedTechnique
CompositionTechnique * getSupportedTechnique(const String &schemeName=StringUtil::BLANK)
Get a pointer to a supported technique for a given scheme.
Ogre::Compositor::mGlobalMRTs
GlobalMRTMap mGlobalMRTs
Definition: OgreCompositor.h:174
OgreResource.h
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::ResourceManager
Defines a generic resource handler.
Definition: OgreResourceManager.h:123
Ogre::Compositor::loadImpl
void loadImpl(void)
Internal implementation of the meat of the 'load' action, only called if this resource is not being l...
Ogre::SharedPtr< Texture >
Ogre::Compositor::getRenderTarget
RenderTarget * getRenderTarget(const String &name)
Get the render target for a given render texture name.
OgreIteratorWrappers.h
Ogre::Resource
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:80
Ogre::Compositor::getTextureInstance
TexturePtr getTextureInstance(const String &name, size_t mrtIndex)
Get the instance of a global texture.
Ogre::Compositor::getSupportedTechnique
CompositionTechnique * getSupportedTechnique(size_t idx)
Get a supported technique.
Ogre::Compositor::compile
void compile()
Check supportedness of techniques.
Ogre::Compositor::getTechnique
CompositionTechnique * getTechnique(size_t idx)
Get a technique.
Ogre::Compositor::TechniqueIterator
VectorIterator< Techniques > TechniqueIterator
Definition: OgreCompositor.h:59
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::ManualResourceLoader
Interface describing a manual resource loader.
Definition: OgreResource.h:515
Ogre::Compositor::getNumTechniques
size_t getNumTechniques()
Get the number of techniques.
Ogre::Compositor::getSupportedTechniqueIterator
TechniqueIterator getSupportedTechniqueIterator(void)
Gets an iterator over all the Techniques which are supported by the current card.
Ogre::Compositor::removeAllTechniques
void removeAllTechniques()
Remove all techniques.
Ogre::Compositor::~Compositor
~Compositor()

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.