OGRE  2.0
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-2014 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 #include "OgreHeaderPrefix.h"
35 
36 namespace Ogre {
137  {
138  private:
149  // same as above, except the color is set to 1 to enable debug volumes to be seen
160 
171  // same as above, except the color is set to 1 to enable debug volumes to be seen
182 
186 
187  static bool mInitialised;
188 
189  public:
190 #define OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS 8
191  enum Programs
192  {
193  // Point light extruder, infinite distance
194  POINT_LIGHT = 0,
195  // Point light extruder, infinite distance, debug mode
196  POINT_LIGHT_DEBUG = 1,
197  // Directional light extruder, infinite distance
198  DIRECTIONAL_LIGHT = 2,
199  // Directional light extruder, infinite distance, debug mode
200  DIRECTIONAL_LIGHT_DEBUG = 3,
201  // Point light extruder, finite distance
202  POINT_LIGHT_FINITE = 4,
203  // Point light extruder, finite distance, debug mode
204  POINT_LIGHT_FINITE_DEBUG = 5,
205  // Directional light extruder, finite distance
206  DIRECTIONAL_LIGHT_FINITE = 6,
207  // Directional light extruder, finite distance, debug mode
208  DIRECTIONAL_LIGHT_FINITE_DEBUG = 7
209 
210  };
211  static const String programNames[OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS];
213 
215  static void initialise(void);
217  static void shutdown(void);
219  static const String& getPointLightExtruderArbvp1(void) { return mPointArbvp1; }
221  static const String& getPointLightExtruderVs_1_1(void) { return mPointVs_1_1; }
223  static const String& getPointLightExtruderVs_4_0(void) { return mPointVs_4_0; }
225  static const String& getPointLightExtruderVs_glsl(void) { return mPointVs_glsl; }
227  static const String& getPointLightExtruderVs_glsles(void) { return mPointVs_glsles; }
229  static const String& getDirectionalLightExtruderArbvp1(void) { return mDirArbvp1; }
231  static const String& getDirectionalLightExtruderVs_1_1(void) { return mDirVs_1_1; }
233  static const String& getDirectionalLightExtruderVs_4_0(void) { return mDirVs_4_0; }
235  static const String& getDirectionalLightExtruderVs_glsl(void) { return mDirVs_glsl; }
237  static const String& getDirectionalLightExtruderVs_glsles(void) { return mDirVs_glsles; }
238 
240  static const String& getPointLightExtruderArbvp1Debug(void) { return mPointArbvp1Debug; }
242  static const String& getPointLightExtruderVs_1_1Debug(void) { return mPointVs_1_1Debug; }
244  static const String& getPointLightExtruderVs_4_0Debug(void) { return mPointVs_4_0Debug; }
246  static const String& getPointLightExtruderVs_glslDebug(void) { return mPointVs_glslDebug; }
248  static const String& getPointLightExtruderVs_glslesDebug(void) { return mPointVs_glslesDebug; }
250  static const String& getDirectionalLightExtruderArbvp1Debug(void) { return mDirArbvp1Debug; }
252  static const String& getDirectionalLightExtruderVs_1_1Debug(void) { return mDirVs_1_1Debug; }
254  static const String& getDirectionalLightExtruderVs_4_0Debug(void) { return mDirVs_4_0Debug; }
256  static const String& getDirectionalLightExtruderVs_glslDebug(void) { return mDirVs_glslDebug; }
258  static const String& getDirectionalLightExtruderVs_glslesDebug(void) { return mDirVs_glslesDebug; }
260  static const String& getProgramSource(Light::LightTypes lightType, const String &syntax,
261  bool finite, bool debug);
262 
263  static const String& getProgramName(Light::LightTypes lightType, bool finite, bool debug);
264 
265 
267  static const String& getPointLightExtruderArbvp1Finite(void) { return mPointArbvp1Finite; }
269  static const String& getPointLightExtruderVs_1_1Finite(void) { return mPointVs_1_1Finite; }
271  static const String& getPointLightExtruderVs_4_0Finite(void) { return mPointVs_4_0Finite; }
273  static const String& getPointLightExtruderVs_glslFinite(void) { return mPointVs_glslFinite; }
275  static const String& getPointLightExtruderVs_glslesFinite(void) { return mPointVs_glslesFinite; }
277  static const String& getDirectionalLightExtruderArbvp1Finite(void) { return mDirArbvp1Finite; }
279  static const String& getDirectionalLightExtruderVs_1_1Finite(void) { return mDirVs_1_1Finite; }
281  static const String& getDirectionalLightExtruderVs_4_0Finite(void) { return mDirVs_4_0Finite; }
283  static const String& getDirectionalLightExtruderVs_glslFinite(void) { return mDirVs_glslFinite; }
285  static const String& getDirectionalLightExtruderVs_glslesFinite(void) { return mDirVs_glslesFinite; }
286 
288  static const String& getPointLightExtruderArbvp1FiniteDebug(void) { return mPointArbvp1FiniteDebug; }
290  static const String& getPointLightExtruderVs_1_1FiniteDebug(void) { return mPointVs_1_1FiniteDebug; }
292  static const String& getPointLightExtruderVs_4_0FiniteDebug(void) { return mPointVs_4_0FiniteDebug; }
294  static const String& getPointLightExtruderVs_glslFiniteDebug(void) { return mPointVs_glslFiniteDebug; }
296  static const String& getPointLightExtruderVs_glslesFiniteDebug(void) { return mPointVs_glslesFiniteDebug; }
298  static const String& getDirectionalLightExtruderArbvp1FiniteDebug(void) { return mDirArbvp1FiniteDebug; }
300  static const String& getDirectionalLightExtruderVs_1_1FiniteDebug(void) { return mDirVs_1_1FiniteDebug; }
302  static const String& getDirectionalLightExtruderVs_4_0FiniteDebug(void) { return mDirVs_4_0FiniteDebug; }
304  static const String& getDirectionalLightExtruderVs_glslFiniteDebug(void) { return mDirVs_glslFiniteDebug; }
306  static const String& getDirectionalLightExtruderVs_glslesFiniteDebug(void) { return mDirVs_glslesFiniteDebug; }
307 
308  };
311 }
312 
313 #include "OgreHeaderSuffix.h"
314 
315 #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:255
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:79
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 & getDirectionalLightExtruderVs_glslFinite(void)
Get FINITE extruder program source for directional lights, compatible with glsl.
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.
static const String & getPointLightExtruderVs_glsl(void)
Get extruder program source for point lights, compatible with glsl.
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 & getPointLightExtruderVs_glslFinite(void)
Get FINITE extruder program source for point lights, compatible with glsl.
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 & getDirectionalLightExtruderVs_glsl(void)
Get extruder program source for directional lights, compatible with glsl.
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 & getPointLightExtruderVs_glslDebug(void)
Get extruder program source for debug point lights, compatible with glsl.
static const String & getDirectionalLightExtruderVs_4_0Debug(void)
Get extruder program source for debug directional lights, compatible with vs_4_0. ...
static const String & getPointLightExtruderVs_glslFiniteDebug(void)
Get extruder program source for debug point lights, compatible with glsl.
static const String & getDirectionalLightExtruderVs_glslFiniteDebug(void)
Get FINITE extruder program source for debug directional lights, compatible with glsl.
_StringBase String
Definition: OgreCommon.h:53
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 & getDirectionalLightExtruderVs_glslDebug(void)
Get extruder program source for debug directional lights, compatible with glsl.
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.