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 __CompositionPass_H__ 00030 #define __CompositionPass_H__ 00031 00032 #include "OgrePrerequisites.h" 00033 #include "OgreMaterial.h" 00034 #include "OgreRenderSystem.h" 00035 #include "OgreRenderQueue.h" 00036 00037 namespace Ogre { 00041 class _OgreExport CompositionPass 00042 { 00043 public: 00044 CompositionPass(CompositionTargetPass *parent); 00045 ~CompositionPass(); 00046 00049 enum PassType 00050 { 00051 PT_CLEAR, // Clear target to one colour 00052 PT_STENCIL, // Set stencil operation 00053 PT_RENDERSCENE, // Render the scene or part of it 00054 PT_RENDERQUAD // Render a full screen quad 00055 }; 00056 00058 void setType(PassType type); 00060 PassType getType() const; 00061 00065 void setIdentifier(uint32 id); 00067 uint32 getIdentifier() const; 00068 00072 void setMaterial(const MaterialPtr& mat); 00076 void setMaterialName(const String &name); 00080 const MaterialPtr& getMaterial() const; 00084 void setFirstRenderQueue(uint8 id); 00088 uint8 getFirstRenderQueue(); 00092 void setLastRenderQueue(uint8 id); 00096 uint8 getLastRenderQueue(); 00097 00108 void setClearBuffers(uint32 val); 00112 uint32 getClearBuffers(); 00116 void setClearColour(ColourValue val); 00120 const ColourValue &getClearColour(); 00124 void setClearDepth(Real depth); 00128 Real getClearDepth(); 00132 void setClearStencil(uint32 value); 00136 uint32 getClearStencil(); 00137 00141 void setStencilCheck(bool value); 00145 bool getStencilCheck(); 00149 void setStencilFunc(CompareFunction value); 00153 CompareFunction getStencilFunc(); 00157 void setStencilRefValue(uint32 value); 00161 uint32 getStencilRefValue(); 00165 void setStencilMask(uint32 value); 00169 uint32 getStencilMask(); 00173 void setStencilFailOp(StencilOperation value); 00177 StencilOperation getStencilFailOp(); 00181 void setStencilDepthFailOp(StencilOperation value); 00185 StencilOperation getStencilDepthFailOp(); 00189 void setStencilPassOp(StencilOperation value); 00193 StencilOperation getStencilPassOp(); 00197 void setStencilTwoSidedOperation(bool value); 00201 bool getStencilTwoSidedOperation(); 00202 00208 void setInput(size_t id, const String &input=""); 00209 00214 const String &getInput(size_t id); 00215 00219 size_t getNumInputs(); 00220 00224 void clearAllInputs(); 00225 00229 CompositionTargetPass *getParent(); 00230 00233 bool _isSupported(void); 00234 00235 private: 00237 CompositionTargetPass *mParent; 00239 PassType mType; 00241 uint32 mIdentifier; 00243 MaterialPtr mMaterial; 00245 uint8 mFirstRenderQueue; 00246 uint8 mLastRenderQueue; 00248 uint32 mClearBuffers; 00250 ColourValue mClearColour; 00252 Real mClearDepth; 00254 uint32 mClearStencil; 00257 String mInputs[OGRE_MAX_TEXTURE_LAYERS]; 00259 bool mStencilCheck; 00260 CompareFunction mStencilFunc; 00261 uint32 mStencilRefValue; 00262 uint32 mStencilMask; 00263 StencilOperation mStencilFailOp; 00264 StencilOperation mStencilDepthFailOp; 00265 StencilOperation mStencilPassOp; 00266 bool mStencilTwoSidedOperation; 00267 }; 00268 00269 } 00270 00271 #endif
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun May 6 10:54:21 2007