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 © 2000-2004 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 00026 #ifndef __SHADOWVOLUMEEXTRUDEPROGRAM_H__ 00027 #define __SHADOWVOLUMEEXTRUDEPROGRAM_H__ 00028 00029 #include "OgrePrerequisites.h" 00030 #include "OgreLight.h" 00031 00032 namespace Ogre { 00126 class _OgreExport ShadowVolumeExtrudeProgram 00127 { 00128 private: 00129 static String mPointArbvp1; 00130 static String mPointVs_1_1; 00131 static String mDirArbvp1; 00132 static String mDirVs_1_1; 00133 // same as above, except the color is set to 1 to enable debug volumes to be seen 00134 static String mPointArbvp1Debug; 00135 static String mPointVs_1_1Debug; 00136 static String mDirArbvp1Debug; 00137 static String mDirVs_1_1Debug; 00138 00139 static String mPointArbvp1Finite; 00140 static String mPointVs_1_1Finite; 00141 static String mDirArbvp1Finite; 00142 static String mDirVs_1_1Finite; 00143 // same as above, except the color is set to 1 to enable debug volumes to be seen 00144 static String mPointArbvp1FiniteDebug; 00145 static String mPointVs_1_1FiniteDebug; 00146 static String mDirArbvp1FiniteDebug; 00147 static String mDirVs_1_1FiniteDebug; 00148 00149 public: 00150 #define NUM_SHADOW_EXTRUDER_PROGRAMS 8 00151 enum Programs 00152 { 00153 // Point light extruder, infinite distance 00154 POINT_LIGHT = 0, 00155 // Point light extruder, infinite distance, debug mode 00156 POINT_LIGHT_DEBUG = 1, 00157 // Directional light extruder, infinite distance 00158 DIRECTIONAL_LIGHT = 2, 00159 // Directional light extruder, infinite distance, debug mode 00160 DIRECTIONAL_LIGHT_DEBUG = 3, 00161 // Point light extruder, finite distance 00162 POINT_LIGHT_FINITE = 4, 00163 // Point light extruder, finite distance, debug mode 00164 POINT_LIGHT_FINITE_DEBUG = 5, 00165 // Directional light extruder, finite distance 00166 DIRECTIONAL_LIGHT_FINITE = 6, 00167 // Directional light extruder, finite distance, debug mode 00168 DIRECTIONAL_LIGHT_FINITE_DEBUG = 7 00169 00170 }; 00171 static const String programNames[NUM_SHADOW_EXTRUDER_PROGRAMS]; 00172 00174 static void initialise(void); 00176 static const String& getPointLightExtruderArbvp1(void) { return mPointArbvp1; } 00178 static const String& getPointLightExtruderVs_1_1(void) { return mPointVs_1_1; } 00180 static const String& getDirectionalLightExtruderArbvp1(void) { return mDirArbvp1; } 00182 static const String& getDirectionalLightExtruderVs_1_1(void) { return mDirVs_1_1; } 00183 00185 static const String& getPointLightExtruderArbvp1Debug(void) { return mPointArbvp1Debug; } 00187 static const String& getPointLightExtruderVs_1_1Debug(void) { return mPointVs_1_1Debug; } 00189 static const String& getDirectionalLightExtruderArbvp1Debug(void) { return mDirArbvp1Debug; } 00191 static const String& getDirectionalLightExtruderVs_1_1Debug(void) { return mDirVs_1_1Debug; } 00193 static const String& getProgramSource(Light::LightTypes lightType, const String syntax, 00194 bool finite, bool debug); 00195 00196 static const String& getProgramName(Light::LightTypes lightType, bool finite, bool debug); 00197 00198 00199 00200 00201 00203 static const String& getPointLightExtruderArbvp1Finite(void) { return mPointArbvp1Finite; } 00205 static const String& getPointLightExtruderVs_1_1Finite(void) { return mPointVs_1_1Finite; } 00207 static const String& getDirectionalLightExtruderArbvp1Finite(void) { return mDirArbvp1Finite; } 00209 static const String& getDirectionalLightExtruderVs_1_1Finite(void) { return mDirVs_1_1Finite; } 00210 00212 static const String& getPointLightExtruderArbvp1FiniteDebug(void) { return mPointArbvp1FiniteDebug; } 00214 static const String& getPointLightExtruderVs_1_1FiniteDebug(void) { return mPointVs_1_1FiniteDebug; } 00216 static const String& getDirectionalLightExtruderArbvp1FiniteDebug(void) { return mDirArbvp1FiniteDebug; } 00218 static const String& getDirectionalLightExtruderVs_1_1FiniteDebug(void) { return mDirVs_1_1FiniteDebug; } 00219 00220 00221 00222 00223 }; 00224 } 00225 #endif
Copyright © 2002-2003 by The OGRE Team
Last modified Fri May 14 23:22:47 2004