Main Page Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# OgreShadowVolumeExtrudeProgram.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 © 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         static bool mInitialised;
    00150
    00151     public:
    00152 #define NUM_SHADOW_EXTRUDER_PROGRAMS 8
    00153         enum Programs
    00154         {
    00155             // Point light extruder, infinite distance
    00156             POINT_LIGHT = 0,
    00157             // Point light extruder, infinite distance, debug mode
    00158             POINT_LIGHT_DEBUG = 1,
    00159             // Directional light extruder, infinite distance
    00160             DIRECTIONAL_LIGHT = 2,
    00161             // Directional light extruder, infinite distance, debug mode
    00162             DIRECTIONAL_LIGHT_DEBUG = 3,
    00163             // Point light extruder, finite distance
    00164             POINT_LIGHT_FINITE = 4,
    00165             // Point light extruder, finite distance, debug mode
    00166             POINT_LIGHT_FINITE_DEBUG = 5,
    00167             // Directional light extruder, finite distance
    00168             DIRECTIONAL_LIGHT_FINITE = 6,
    00169             // Directional light extruder, finite distance, debug mode
    00170             DIRECTIONAL_LIGHT_FINITE_DEBUG = 7
    00171
    00172         };
    00173         static const String programNames[NUM_SHADOW_EXTRUDER_PROGRAMS];
    00174
    00176         static void initialise(void);
    00178         static const String& getPointLightExtruderArbvp1(void) { return mPointArbvp1; }
    00180         static const String& getPointLightExtruderVs_1_1(void) { return mPointVs_1_1; }
    00182         static const String& getDirectionalLightExtruderArbvp1(void) { return mDirArbvp1; }
    00184         static const String& getDirectionalLightExtruderVs_1_1(void) { return mDirVs_1_1; }
    00185
    00187         static const String& getPointLightExtruderArbvp1Debug(void) { return mPointArbvp1Debug; }
    00189         static const String& getPointLightExtruderVs_1_1Debug(void) { return mPointVs_1_1Debug; }
    00191         static const String& getDirectionalLightExtruderArbvp1Debug(void) { return mDirArbvp1Debug; }
    00193         static const String& getDirectionalLightExtruderVs_1_1Debug(void) { return mDirVs_1_1Debug; }
    00195         static const String& getProgramSource(Light::LightTypes lightType, const String syntax,
    00196             bool finite, bool debug);
    00197
    00198         static const String& getProgramName(Light::LightTypes lightType, bool finite, bool debug);
    00199
    00200
    00201
    00202
    00203
    00205         static const String& getPointLightExtruderArbvp1Finite(void) { return mPointArbvp1Finite; }
    00207         static const String& getPointLightExtruderVs_1_1Finite(void) { return mPointVs_1_1Finite; }
    00209         static const String& getDirectionalLightExtruderArbvp1Finite(void) { return mDirArbvp1Finite; }
    00211         static const String& getDirectionalLightExtruderVs_1_1Finite(void) { return mDirVs_1_1Finite; }
    00212
    00214         static const String& getPointLightExtruderArbvp1FiniteDebug(void) { return mPointArbvp1FiniteDebug; }
    00216         static const String& getPointLightExtruderVs_1_1FiniteDebug(void) { return mPointVs_1_1FiniteDebug; }
    00218         static const String& getDirectionalLightExtruderArbvp1FiniteDebug(void) { return mDirArbvp1FiniteDebug; }
    00220         static const String& getDirectionalLightExtruderVs_1_1FiniteDebug(void) { return mDirVs_1_1FiniteDebug; }
    00221
    00222
    00223
    00224
    00225     };
    00226 }
    00227 #endif

Copyright © 2002-2003 by The OGRE Team
Last modified Sun Nov 28 19:48:46 2004