OgreCompositor.h
Go to the documentation of this file.
/*
-----------------------------------------------------------------------------
This source file is part of OGRE
(Object-oriented Graphics Rendering Engine)
For the latest info, see http://www.ogre3d.org/
Copyright (c) 2000-2013 Torus Knot Software Ltd
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-----------------------------------------------------------------------------
*/
#ifndef __Compositor_H__
#define __Compositor_H__
#include "OgrePrerequisites.h"
#include "OgreIteratorWrappers.h"
#include "OgreResource.h"
#include "OgreTexture.h"
#include "OgreHeaderPrefix.h"
namespace Ogre {
class _OgreExport Compositor: public Resource
{
public:
Compositor(ResourceManager* creator, const String& name, ResourceHandle handle,
const String& group, bool isManual = false, ManualResourceLoader* loader = 0);
~Compositor();
typedef vector<CompositionTechnique *>::type Techniques;
typedef VectorIterator<Techniques> TechniqueIterator;
CompositionTechnique *createTechnique();
void removeTechnique(size_t idx);
CompositionTechnique *getTechnique(size_t idx);
size_t getNumTechniques();
void removeAllTechniques();
TechniqueIterator getTechniqueIterator(void);
CompositionTechnique *getSupportedTechnique(size_t idx);
size_t getNumSupportedTechniques();
TechniqueIterator getSupportedTechniqueIterator(void);
CompositionTechnique *getSupportedTechnique(const String& schemeName = StringUtil::BLANK);
const String& getTextureInstanceName(const String& name, size_t mrtIndex);
TexturePtr getTextureInstance(const String& name, size_t mrtIndex);
RenderTarget* getRenderTarget(const String& name);
protected:
void loadImpl(void);
void unloadImpl(void);
size_t calculateSize(void) const;
void compile();
private:
Techniques mTechniques;
Techniques mSupportedTechniques;
bool mCompilationRequired;
void createGlobalTextures();
void freeGlobalTextures();
//TODO GSOC : These typedefs are duplicated from CompositorInstance. Solve?
typedef map<String,TexturePtr>::type GlobalTextureMap;
GlobalTextureMap mGlobalTextures;
typedef map<String,MultiRenderTarget*>::type GlobalMRTMap;
GlobalMRTMap mGlobalMRTs;
};
}
#include "OgreHeaderSuffix.h"
#endif
Ogre::Compositor::GlobalMRTMap
map< String, MultiRenderTarget * >::type GlobalMRTMap
Store a list of MRTs we&#39;ve created.
Definition: OgreCompositor.h:173
Ogre::RenderTarget
A &#39;canvas&#39; which can receive the results of a rendering operation.
Definition: OgreRenderTarget.h:65
Ogre::Compositor::mGlobalMRTs
GlobalMRTMap mGlobalMRTs
Definition: OgreCompositor.h:174
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::Compositor::mSupportedTechniques
Techniques mSupportedTechniques
Definition: OgreCompositor.h:153
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
OgreResource.h
Ogre::Compositor::GlobalTextureMap
map< String, TexturePtr >::type GlobalTextureMap
Map from name->local texture.
Definition: OgreCompositor.h:170
Ogre::Compositor::Techniques
vector< CompositionTechnique * >::type Techniques
Data types for internal lists.
Definition: OgreCompositor.h:58
Ogre::Resource
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:79
Ogre::Compositor::mTechniques
Techniques mTechniques
Definition: OgreCompositor.h:152
Ogre::ManualResourceLoader
Interface describing a manual resource loader.
Definition: OgreResource.h:514
Ogre::ResourceHandle
unsigned long long int ResourceHandle
Definition: OgreResource.h:41
Ogre::Compositor::TechniqueIterator
VectorIterator< Techniques > TechniqueIterator
Definition: OgreCompositor.h:59
Ogre::CompositionTechnique
Base composition technique, can be subclassed in plugins.
Definition: OgreCompositionTechnique.h:45
Ogre::Compositor
Class representing a Compositor object.
Definition: OgreCompositor.h:50
OgrePrerequisites.h
OgreTexture.h
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
OgreHeaderSuffix.h
Ogre::ResourceManager
Defines a generic resource handler.
Definition: OgreResourceManager.h:122
OgreIteratorWrappers.h
Ogre
Definition: OgreAndroidLogListener.h:34
Ogre::SharedPtr< Texture >
Ogre::vector
Definition: OgrePrerequisites.h:491
OgreHeaderPrefix.h
Ogre::Compositor::mGlobalTextures
GlobalTextureMap mGlobalTextures
Definition: OgreCompositor.h:171
Ogre::map
Definition: OgrePrerequisites.h:533
Ogre::StringUtil::BLANK
static const String BLANK
Constant blank string, useful for returning by ref where local does not exist.
Definition: OgreString.h:196
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

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