OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreShadowVolumeExtrudeProgram.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 
29 #ifndef __SHADOWVOLUMEEXTRUDEPROGRAM_H__
30 #define __SHADOWVOLUMEEXTRUDEPROGRAM_H__
31 
32 #include "OgrePrerequisites.h"
33 #include "OgreLight.h"
34 
35 namespace Ogre {
136  {
137  private:
146  // same as above, except the color is set to 1 to enable debug volumes to be seen
155 
164  // same as above, except the color is set to 1 to enable debug volumes to be seen
173 
176 
177  static bool mInitialised;
178 
179  public:
180 #define OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS 8
181  enum Programs
182  {
183  // Point light extruder, infinite distance
184  POINT_LIGHT = 0,
185  // Point light extruder, infinite distance, debug mode
186  POINT_LIGHT_DEBUG = 1,
187  // Directional light extruder, infinite distance
188  DIRECTIONAL_LIGHT = 2,
189  // Directional light extruder, infinite distance, debug mode
190  DIRECTIONAL_LIGHT_DEBUG = 3,
191  // Point light extruder, finite distance
192  POINT_LIGHT_FINITE = 4,
193  // Point light extruder, finite distance, debug mode
194  POINT_LIGHT_FINITE_DEBUG = 5,
195  // Directional light extruder, finite distance
196  DIRECTIONAL_LIGHT_FINITE = 6,
197  // Directional light extruder, finite distance, debug mode
198  DIRECTIONAL_LIGHT_FINITE_DEBUG = 7
199 
200  };
201  static const String programNames[OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS];
203 
205  static void initialise(void);
207  static void shutdown(void);
209  static const String& getPointLightExtruderArbvp1(void) { return mPointArbvp1; }
211  static const String& getPointLightExtruderVs_1_1(void) { return mPointVs_1_1; }
213  static const String& getPointLightExtruderVs_4_0(void) { return mPointVs_4_0; }
215  static const String& getPointLightExtruderVs_glsles(void) { return mPointVs_glsles; }
217  static const String& getDirectionalLightExtruderArbvp1(void) { return mDirArbvp1; }
219  static const String& getDirectionalLightExtruderVs_1_1(void) { return mDirVs_1_1; }
221  static const String& getDirectionalLightExtruderVs_4_0(void) { return mDirVs_4_0; }
223  static const String& getDirectionalLightExtruderVs_glsles(void) { return mDirVs_glsles; }
224 
226  static const String& getPointLightExtruderArbvp1Debug(void) { return mPointArbvp1Debug; }
228  static const String& getPointLightExtruderVs_1_1Debug(void) { return mPointVs_1_1Debug; }
230  static const String& getPointLightExtruderVs_4_0Debug(void) { return mPointVs_4_0Debug; }
232  static const String& getPointLightExtruderVs_glslesDebug(void) { return mPointVs_glslesDebug; }
234  static const String& getDirectionalLightExtruderArbvp1Debug(void) { return mDirArbvp1Debug; }
236  static const String& getDirectionalLightExtruderVs_1_1Debug(void) { return mDirVs_1_1Debug; }
238  static const String& getDirectionalLightExtruderVs_4_0Debug(void) { return mDirVs_4_0Debug; }
240  static const String& getDirectionalLightExtruderVs_glslesDebug(void) { return mDirVs_glslesDebug; }
242  static const String& getProgramSource(Light::LightTypes lightType, const String syntax,
243  bool finite, bool debug);
244 
245  static const String& getProgramName(Light::LightTypes lightType, bool finite, bool debug);
246 
247 
249  static const String& getPointLightExtruderArbvp1Finite(void) { return mPointArbvp1Finite; }
251  static const String& getPointLightExtruderVs_1_1Finite(void) { return mPointVs_1_1Finite; }
253  static const String& getPointLightExtruderVs_4_0Finite(void) { return mPointVs_4_0Finite; }
255  static const String& getPointLightExtruderVs_glslesFinite(void) { return mPointVs_glslesFinite; }
257  static const String& getDirectionalLightExtruderArbvp1Finite(void) { return mDirArbvp1Finite; }
259  static const String& getDirectionalLightExtruderVs_1_1Finite(void) { return mDirVs_1_1Finite; }
261  static const String& getDirectionalLightExtruderVs_4_0Finite(void) { return mDirVs_4_0Finite; }
263  static const String& getDirectionalLightExtruderVs_glslesFinite(void) { return mDirVs_glslesFinite; }
264 
266  static const String& getPointLightExtruderArbvp1FiniteDebug(void) { return mPointArbvp1FiniteDebug; }
268  static const String& getPointLightExtruderVs_1_1FiniteDebug(void) { return mPointVs_1_1FiniteDebug; }
270  static const String& getPointLightExtruderVs_4_0FiniteDebug(void) { return mPointVs_4_0FiniteDebug; }
272  static const String& getPointLightExtruderVs_glslesFiniteDebug(void) { return mPointVs_glslesFiniteDebug; }
274  static const String& getDirectionalLightExtruderArbvp1FiniteDebug(void) { return mDirArbvp1FiniteDebug; }
276  static const String& getDirectionalLightExtruderVs_1_1FiniteDebug(void) { return mDirVs_1_1FiniteDebug; }
278  static const String& getDirectionalLightExtruderVs_4_0FiniteDebug(void) { return mDirVs_4_0FiniteDebug; }
280  static const String& getDirectionalLightExtruderVs_glslesFiniteDebug(void) { return mDirVs_glslesFiniteDebug; }
281 
282  };
285 }
286 #endif
static const String & getPointLightExtruderVs_4_0Finite(void)
Get FINITE extruder program source for point lights, compatible with vs_4_0.
Static class containing source for vertex programs for extruding shadow volumes.
#define _OgreExport
Definition: OgrePlatform.h:233
static const String & getDirectionalLightExtruderArbvp1Finite(void)
Get FINITE extruder program source for directional lights, compatible with arbvp1.
static const String & getDirectionalLightExtruderVs_1_1(void)
Get extruder program source for directional lights, compatible with vs_1_1.
LightTypes
Defines the type of light.
Definition: OgreLight.h:82
static const String & getDirectionalLightExtruderVs_1_1Debug(void)
Get extruder program source for debug directional lights, compatible with vs_1_1. ...
static const String & getDirectionalLightExtruderVs_4_0Finite(void)
Get FINITE extruder program source for directional lights, compatible with vs_4_0.
static const String & getPointLightExtruderArbvp1Debug(void)
Get extruder program source for debug point lights, compatible with arbvp1.
static const String & getDirectionalLightExtruderVs_glslesFinite(void)
Get FINITE extruder program source for directional lights, compatible with glsles.
static const String & getPointLightExtruderVs_glsles(void)
Get extruder program source for point lights, compatible with glsles.
static const String & getPointLightExtruderVs_glslesFinite(void)
Get FINITE extruder program source for point lights, compatible with glsles.
static const String & getPointLightExtruderVs_1_1Finite(void)
Get FINITE extruder program source for point lights, compatible with vs_1_1.
static const String & getPointLightExtruderVs_1_1Debug(void)
Get extruder program source for debug point lights, compatible with vs_1_1.
static const String & getPointLightExtruderArbvp1Finite(void)
Get FINITE extruder program source for point lights, compatible with arbvp1.
static const String & getPointLightExtruderVs_4_0(void)
Get extruder program source for point lights, compatible with vs_4_0.
static const String & getDirectionalLightExtruderVs_1_1Finite(void)
Get FINITE extruder program source for directional lights, compatible with vs_1_1.
static const String & getPointLightExtruderArbvp1(void)
Get extruder program source for point lights, compatible with arbvp1.
static const String & getDirectionalLightExtruderVs_glslesFiniteDebug(void)
Get FINITE extruder program source for debug directional lights, compatible with glsles.
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
static const String & getDirectionalLightExtruderVs_glslesDebug(void)
Get extruder program source for debug directional lights, compatible with glsles. ...
static const String & getPointLightExtruderVs_4_0FiniteDebug(void)
Get extruder program source for debug point lights, compatible with vs_4_0.
static const String & getDirectionalLightExtruderArbvp1FiniteDebug(void)
Get FINITE extruder program source for debug directional lights, compatible with arbvp1.
static const String & getPointLightExtruderArbvp1FiniteDebug(void)
Get FINITE extruder program source for debug point lights, compatible with arbvp1.
static const String & getDirectionalLightExtruderVs_4_0FiniteDebug(void)
Get FINITE extruder program source for debug directional lights, compatible with vs_4_0.
static const String & getDirectionalLightExtruderArbvp1Debug(void)
Get extruder program source for debug directional lights, compatible with arbvp1. ...
static const String & getDirectionalLightExtruderVs_glsles(void)
Get extruder program source for directional lights, compatible with glsles.
#define OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS
static const String & getPointLightExtruderVs_1_1(void)
Get extruder program source for point lights, compatible with vs_1_1.
static const String & getPointLightExtruderVs_4_0Debug(void)
Get extruder program source for debug point lights, compatible with vs_4_0.
static const String & getDirectionalLightExtruderVs_4_0Debug(void)
Get extruder program source for debug directional lights, compatible with vs_4_0. ...
_StringBase String
static const String & getPointLightExtruderVs_glslesDebug(void)
Get extruder program source for debug point lights, compatible with glsles.
static const String & getDirectionalLightExtruderVs_4_0(void)
Get extruder program source for directional lights, compatible with vs_4_0.
static const String & getDirectionalLightExtruderVs_1_1FiniteDebug(void)
Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.
static const String & getDirectionalLightExtruderArbvp1(void)
Get extruder program source for directional lights, compatible with arbvp1.
static const String & getPointLightExtruderVs_glslesFiniteDebug(void)
Get extruder program source for debug point lights, compatible with glsles.
static const String & getPointLightExtruderVs_1_1FiniteDebug(void)
Get extruder program source for debug point lights, compatible with vs_1_1.