# OgreCompositionPass.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-2005 The OGRE Team
    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 */
    00025 #ifndef __CompositionPass_H__
    00026 #define __CompositionPass_H__
    00027
    00028 #include "OgrePrerequisites.h"
    00029 #include "OgreMaterial.h"
    00030 #include "OgreRenderSystem.h"
    00031 #include "OgreRenderQueue.h"
    00032
    00033 namespace Ogre {
    00037     class _OgreExport CompositionPass
    00038     {
    00039     public:
    00040         CompositionPass(CompositionTargetPass *parent);
    00041         ~CompositionPass();
    00042
    00045         enum PassType
    00046         {
    00047             PT_CLEAR,           // Clear target to one colour
    00048             PT_STENCIL,         // Set stencil operation
    00049             PT_RENDERSCENE,     // Render the scene or part of it
    00050             PT_RENDERQUAD       // Render a full screen quad
    00051         };
    00052
    00054         void setType(PassType type);
    00056         PassType getType() const;
    00057
    00061         void setIdentifier(uint32 id);
    00063         uint32 getIdentifier() const;
    00064
    00068         void setMaterial(const MaterialPtr& mat);
    00072         void setMaterialName(const String &name);
    00076         const MaterialPtr& getMaterial() const;
    00080         void setFirstRenderQueue(uint8 id);
    00084         uint8 getFirstRenderQueue();
    00088         void setLastRenderQueue(uint8 id);
    00092         uint8 getLastRenderQueue();
    00093
    00104         void setClearBuffers(uint32 val);
    00108         uint32 getClearBuffers();
    00112         void setClearColour(ColourValue val);
    00116         const ColourValue &getClearColour();
    00120         void setClearDepth(Real depth);
    00124         Real getClearDepth();
    00128         void setClearStencil(uint32 value);
    00132         uint32 getClearStencil();
    00133
    00137         void setStencilCheck(bool value);
    00141         bool getStencilCheck();
    00145         void setStencilFunc(CompareFunction value);
    00149         CompareFunction getStencilFunc();
    00153         void setStencilRefValue(uint32 value);
    00157         uint32 getStencilRefValue();
    00161         void setStencilMask(uint32 value);
    00165         uint32 getStencilMask();
    00169         void setStencilFailOp(StencilOperation value);
    00173         StencilOperation getStencilFailOp();
    00177         void setStencilDepthFailOp(StencilOperation value);
    00181         StencilOperation getStencilDepthFailOp();
    00185         void setStencilPassOp(StencilOperation value);
    00189         StencilOperation getStencilPassOp();
    00193         void setStencilTwoSidedOperation(bool value);
    00197         bool getStencilTwoSidedOperation();
    00198
    00204         void setInput(size_t id, const String &input="");
    00205
    00210         const String &getInput(size_t id);
    00211
    00215         size_t getNumInputs();
    00216
    00220         void clearAllInputs();
    00221
    00225         CompositionTargetPass *getParent();
    00226
    00229         bool _isSupported(void);
    00230
    00231     private:
    00233         CompositionTargetPass *mParent;
    00235         PassType mType;
    00237         uint32 mIdentifier;
    00239         MaterialPtr mMaterial;
    00241         uint8 mFirstRenderQueue;
    00242         uint8 mLastRenderQueue;
    00244         uint32 mClearBuffers;
    00246         ColourValue mClearColour;
    00248         Real mClearDepth;
    00250         uint32 mClearStencil;
    00253         String mInputs[OGRE_MAX_TEXTURE_LAYERS];
    00255         bool mStencilCheck;
    00256         CompareFunction mStencilFunc;
    00257         uint32 mStencilRefValue;
    00258         uint32 mStencilMask;
    00259         StencilOperation mStencilFailOp;
    00260         StencilOperation mStencilDepthFailOp;
    00261         StencilOperation mStencilPassOp;
    00262         bool mStencilTwoSidedOperation;
    00263     };
    00264
    00265 }
    00266
    00267 #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 17 15:39:07 2006