Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

# OgreCompositionTechnique.h

Go to the documentation of this file.

    00001 /*
    00002 -----------------------------------------------------------------------------
    00003 This source file is part of OGRE
    00004     (Object-oriented Graphics Rendering Engine)
    00005 For the latest info, see http://www.ogre3d.org/
    00006
    00007 Copyright (c) 2000-2006 Torus Knot Software Ltd
    00008 Also see acknowledgements in Readme.html
    00009
    00010 This program is free software; you can redistribute it and/or modify it under
    00011 the terms of the GNU Lesser General Public License as published by the Free Software
    00012 Foundation; either version 2 of the License, or (at your option) any later
    00013 version.
    00014
    00015 This program is distributed in the hope that it will be useful, but WITHOUT
    00016 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
    00017 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
    00018
    00019 You should have received a copy of the GNU Lesser General Public License along with
    00020 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
    00021 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
    00022 http://www.gnu.org/copyleft/lesser.txt.
    00023
    00024 You may alternatively use this source under the terms of a specific version of
    00025 the OGRE Unrestricted License provided you have obtained such a license from
    00026 Torus Knot Software Ltd.
    00027 -----------------------------------------------------------------------------
    00028 */
    00029 #ifndef __CompositionTechnique_H__
    00030 #define __CompositionTechnique_H__
    00031
    00032 #include "OgrePrerequisites.h"
    00033 #include "OgrePixelFormat.h"
    00034 #include "OgreIteratorWrappers.h"
    00035
    00036 namespace Ogre {
    00039     class _OgreExport CompositionTechnique
    00040     {
    00041     public:
    00042         CompositionTechnique(Compositor *parent);
    00043         virtual ~CompositionTechnique();
    00044
    00046         class TextureDefinition
    00047         {
    00048         public:
    00049             String name;
    00050             size_t width;       // 0 means adapt to target width
    00051             size_t height;      // 0 means adapt to target height
    00052             PixelFormat format;
    00053
    00054             TextureDefinition() :width(0), height(0), format(PF_R8G8B8A8){}
    00055         };
    00057         typedef std::vector<CompositionTargetPass *> TargetPasses;
    00058         typedef VectorIterator<TargetPasses> TargetPassIterator;
    00059         typedef std::vector<TextureDefinition*> TextureDefinitions;
    00060         typedef VectorIterator<TextureDefinitions> TextureDefinitionIterator;
    00061
    00065         TextureDefinition *createTextureDefinition(const String &name);
    00066
    00069         void removeTextureDefinition(size_t idx);
    00070
    00073         TextureDefinition *getTextureDefinition(size_t idx);
    00074
    00077         size_t getNumTextureDefinitions();
    00078
    00081         void removeAllTextureDefinitions();
    00082
    00084         TextureDefinitionIterator getTextureDefinitionIterator(void);
    00085
    00088         CompositionTargetPass *createTargetPass();
    00089
    00092         void removeTargetPass(size_t idx);
    00093
    00096         CompositionTargetPass *getTargetPass(size_t idx);
    00097
    00100         size_t getNumTargetPasses();
    00101
    00104         void removeAllTargetPasses();
    00105
    00107         TargetPassIterator getTargetPassIterator(void);
    00108
    00111         CompositionTargetPass *getOutputTargetPass();
    00112
    00116         virtual bool isSupported(bool allowTextureDegradation);
    00117
    00120         virtual CompositorInstance *createInstance(CompositorChain *chain);
    00121
    00124         virtual void destroyInstance(CompositorInstance *instance);
    00125
    00127         Compositor *getParent();
    00128     private:
    00130         Compositor *mParent;
    00132         TextureDefinitions mTextureDefinitions;
    00133
    00135         TargetPasses mTargetPasses;
    00137         CompositionTargetPass *mOutputTarget;
    00138
    00140         typedef std::vector<CompositorInstance *> Instances;
    00141         Instances mInstances;
    00142     };
    00143
    00144 }
    00145
    00146 #endif

Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Sep 30 10:50:56 2007