OGRE 2.1
Object-Oriented Graphics Rendering Engine
Loading...
Searching...
No Matches
Ogre::ShadowVolumeExtrudeProgram Class Reference

Static class containing source for vertex programs for extruding shadow volumes. More...

#include <OgreShadowVolumeExtrudeProgram.h>

+ Inheritance diagram for Ogre::ShadowVolumeExtrudeProgram:

Public Types

enum  Programs {
  POINT_LIGHT = 0 , POINT_LIGHT_DEBUG = 1 , DIRECTIONAL_LIGHT = 2 , DIRECTIONAL_LIGHT_DEBUG = 3 ,
  POINT_LIGHT_FINITE = 4 , POINT_LIGHT_FINITE_DEBUG = 5 , DIRECTIONAL_LIGHT_FINITE = 6 , DIRECTIONAL_LIGHT_FINITE_DEBUG = 7
}
 

Public Member Functions

void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info
 
voidoperator new (size_t sz, void *ptr)
 placement operator new
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info
 

Static Public Member Functions

static void AddInternalProgram (String name, String source, String language, String entryPoint, String target, GpuProgramType type)
 Add and load high level gpu program.
 
static const StringgetDirectionalLightExtruderArbvp1 (void)
 Get extruder program source for directional lights, compatible with arbvp1.
 
static const StringgetDirectionalLightExtruderArbvp1Debug (void)
 Get extruder program source for debug directional lights, compatible with arbvp1.
 
static const StringgetDirectionalLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with arbvp1.
 
static const StringgetDirectionalLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with arbvp1.
 
static const StringgetDirectionalLightExtruderVs_1_1 (void)
 Get extruder program source for directional lights, compatible with vs_1_1.
 
static const StringgetDirectionalLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug directional lights, compatible with vs_1_1.
 
static const StringgetDirectionalLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for directional lights, compatible with vs_1_1.
 
static const StringgetDirectionalLightExtruderVs_1_1FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.
 
static const StringgetDirectionalLightExtruderVs_4_0 (void)
 Get extruder program source for directional lights, compatible with vs_4_0.
 
static const StringgetDirectionalLightExtruderVs_4_0Debug (void)
 Get extruder program source for debug directional lights, compatible with vs_4_0.
 
static const StringgetDirectionalLightExtruderVs_4_0Finite (void)
 Get FINITE extruder program source for directional lights, compatible with vs_4_0.
 
static const StringgetDirectionalLightExtruderVs_4_0FiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with vs_4_0.
 
static const StringgetDirectionalLightExtruderVs_glsl (void)
 Get extruder program source for directional lights, compatible with glsl.
 
static const StringgetDirectionalLightExtruderVs_glslDebug (void)
 Get extruder program source for debug directional lights, compatible with glsl.
 
static const StringgetDirectionalLightExtruderVs_glsles (void)
 Get extruder program source for directional lights, compatible with glsles.
 
static const StringgetDirectionalLightExtruderVs_glslesDebug (void)
 Get extruder program source for debug directional lights, compatible with glsles.
 
static const StringgetDirectionalLightExtruderVs_glslesFinite (void)
 Get FINITE extruder program source for directional lights, compatible with glsles.
 
static const StringgetDirectionalLightExtruderVs_glslesFiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with glsles.
 
static const StringgetDirectionalLightExtruderVs_glslFinite (void)
 Get FINITE extruder program source for directional lights, compatible with glsl.
 
static const StringgetDirectionalLightExtruderVs_glslFiniteDebug (void)
 Get FINITE extruder program source for debug directional lights, compatible with glsl.
 
static const StringgetPointLightExtruderArbvp1 (void)
 Get extruder program source for point lights, compatible with arbvp1.
 
static const StringgetPointLightExtruderArbvp1Debug (void)
 Get extruder program source for debug point lights, compatible with arbvp1.
 
static const StringgetPointLightExtruderArbvp1Finite (void)
 Get FINITE extruder program source for point lights, compatible with arbvp1.
 
static const StringgetPointLightExtruderArbvp1FiniteDebug (void)
 Get FINITE extruder program source for debug point lights, compatible with arbvp1.
 
static const StringgetPointLightExtruderVs_1_1 (void)
 Get extruder program source for point lights, compatible with vs_1_1.
 
static const StringgetPointLightExtruderVs_1_1Debug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1.
 
static const StringgetPointLightExtruderVs_1_1Finite (void)
 Get FINITE extruder program source for point lights, compatible with vs_1_1.
 
static const StringgetPointLightExtruderVs_1_1FiniteDebug (void)
 Get extruder program source for debug point lights, compatible with vs_1_1.
 
static const StringgetPointLightExtruderVs_4_0 (void)
 Get extruder program source for point lights, compatible with vs_4_0.
 
static const StringgetPointLightExtruderVs_4_0Debug (void)
 Get extruder program source for debug point lights, compatible with vs_4_0.
 
static const StringgetPointLightExtruderVs_4_0Finite (void)
 Get FINITE extruder program source for point lights, compatible with vs_4_0.
 
static const StringgetPointLightExtruderVs_4_0FiniteDebug (void)
 Get extruder program source for debug point lights, compatible with vs_4_0.
 
static const StringgetPointLightExtruderVs_glsl (void)
 Get extruder program source for point lights, compatible with glsl.
 
static const StringgetPointLightExtruderVs_glslDebug (void)
 Get extruder program source for debug point lights, compatible with glsl.
 
static const StringgetPointLightExtruderVs_glsles (void)
 Get extruder program source for point lights, compatible with glsles.
 
static const StringgetPointLightExtruderVs_glslesDebug (void)
 Get extruder program source for debug point lights, compatible with glsles.
 
static const StringgetPointLightExtruderVs_glslesFinite (void)
 Get FINITE extruder program source for point lights, compatible with glsles.
 
static const StringgetPointLightExtruderVs_glslesFiniteDebug (void)
 Get extruder program source for debug point lights, compatible with glsles.
 
static const StringgetPointLightExtruderVs_glslFinite (void)
 Get FINITE extruder program source for point lights, compatible with glsl.
 
static const StringgetPointLightExtruderVs_glslFiniteDebug (void)
 Get extruder program source for debug point lights, compatible with glsl.
 
static const StringgetProgramName (Light::LightTypes lightType, bool finite, bool debug)
 
static const StringgetProgramSource (Light::LightTypes lightType, const String &syntax, bool finite, bool debug)
 General purpose method to get any of the program sources.
 
static void initialise (void)
 Initialise the creation of these vertex programs.
 
static void initialiseModulationPassPrograms (void)
 Initialise the creation of these modulation pass programs.
 
static void shutdown (void)
 Shutdown & destroy the vertex programs.
 

Static Public Attributes

static String frgProgramName
 
static const String programNames [OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS]
 

Detailed Description

Static class containing source for vertex programs for extruding shadow volumes.

Remarks
This exists so we don't have to be dependent on an external media files. Assembler is used so we don't have to rely on particular plugins. The assembler contents of this file were generated from the following Cg:
// Point light shadow volume extrude
float4 position : POSITION,
uniform float4 lightPos // homogeneous, object space
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
(wcoord.xxxx * lightPos) +
float4(position.xyz - lightPos.xyz, 0);
}
// Directional light extrude
float4 position : POSITION,
uniform float4 lightPos // homogenous, object space
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
(wcoord.xxxx * (position + lightPos)) - lightPos;
}
// Point light shadow volume extrude - FINITE
void shadowVolumeExtrudePointLightFinite_vp (
float4 position : POSITION,
float wcoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProjMatrix,
uniform float4 lightPos, // homogeneous, object space
uniform float extrusionDistance // how far to extrude
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
float3 extrusionDir = position.xyz - lightPos.xyz;
extrusionDir = normalize(extrusionDir);
float4 newpos = float4(position.xyz +
((1 - wcoord.x) * extrusionDistance * extrusionDir), 1);
oPosition = mul(worldViewProjMatrix, newpos);
}
// Directional light extrude - FINITE
void shadowVolumeExtrudeDirLightFinite_vp (
float4 position : POSITION,
float wcoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProjMatrix,
uniform float4 lightPos, // homogeneous, object space
uniform float extrusionDistance // how far to extrude
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
// -ve lightPos is direction
float4 newpos = float4(position.xyz -
(wcoord.x * extrusionDistance * lightPos.xyz), 1);
oPosition = mul(worldViewProjMatrix, newpos);
}
Definition OgrePrerequisites.h:655

Member Enumeration Documentation

◆ Programs

Enumerator
POINT_LIGHT 
POINT_LIGHT_DEBUG 
DIRECTIONAL_LIGHT 
DIRECTIONAL_LIGHT_DEBUG 
POINT_LIGHT_FINITE 
POINT_LIGHT_FINITE_DEBUG 
DIRECTIONAL_LIGHT_FINITE 
DIRECTIONAL_LIGHT_FINITE_DEBUG 

Member Function Documentation

◆ AddInternalProgram()

static void Ogre::ShadowVolumeExtrudeProgram::AddInternalProgram ( String  name,
String  source,
String  language,
String  entryPoint,
String  target,
GpuProgramType  type 
)
static

Add and load high level gpu program.

◆ getDirectionalLightExtruderArbvp1()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderArbvp1Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderArbvp1Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderArbvp1FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderArbvp1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with arbvp1.

◆ getDirectionalLightExtruderVs_1_1()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_1_1Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_1_1Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_1_1FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with vs_1_1.

◆ getDirectionalLightExtruderVs_4_0()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0 ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_4_0Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0Debug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_4_0Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0Finite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_4_0FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with vs_4_0.

◆ getDirectionalLightExtruderVs_glsl()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsl ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glslDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslDebug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glsles()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glsles ( void  )
inlinestatic

Get extruder program source for directional lights, compatible with glsles.

◆ getDirectionalLightExtruderVs_glslesDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesDebug ( void  )
inlinestatic

Get extruder program source for debug directional lights, compatible with glsles.

◆ getDirectionalLightExtruderVs_glslesFinite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFinite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with glsles.

◆ getDirectionalLightExtruderVs_glslesFiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslesFiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with glsles.

◆ getDirectionalLightExtruderVs_glslFinite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFinite ( void  )
inlinestatic

Get FINITE extruder program source for directional lights, compatible with glsl.

◆ getDirectionalLightExtruderVs_glslFiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_glslFiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug directional lights, compatible with glsl.

◆ getPointLightExtruderArbvp1()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with arbvp1.

◆ getPointLightExtruderArbvp1Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with arbvp1.

◆ getPointLightExtruderArbvp1Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with arbvp1.

◆ getPointLightExtruderArbvp1FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderArbvp1FiniteDebug ( void  )
inlinestatic

Get FINITE extruder program source for debug point lights, compatible with arbvp1.

◆ getPointLightExtruderVs_1_1()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_1_1Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_1_1Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_1_1FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1FiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_1_1.

◆ getPointLightExtruderVs_4_0()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0 ( void  )
inlinestatic

Get extruder program source for point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_4_0Debug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0Debug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_4_0Finite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0Finite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_4_0FiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0FiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with vs_4_0.

◆ getPointLightExtruderVs_glsl()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsl ( void  )
inlinestatic

Get extruder program source for point lights, compatible with glsl.

◆ getPointLightExtruderVs_glslDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsl.

◆ getPointLightExtruderVs_glsles()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glsles ( void  )
inlinestatic

Get extruder program source for point lights, compatible with glsles.

◆ getPointLightExtruderVs_glslesDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsles.

◆ getPointLightExtruderVs_glslesFinite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFinite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with glsles.

◆ getPointLightExtruderVs_glslesFiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslesFiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsles.

◆ getPointLightExtruderVs_glslFinite()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFinite ( void  )
inlinestatic

Get FINITE extruder program source for point lights, compatible with glsl.

◆ getPointLightExtruderVs_glslFiniteDebug()

static const String & Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFiniteDebug ( void  )
inlinestatic

Get extruder program source for debug point lights, compatible with glsl.

◆ getProgramName()

static const String & Ogre::ShadowVolumeExtrudeProgram::getProgramName ( Light::LightTypes  lightType,
bool  finite,
bool  debug 
)
static

◆ getProgramSource()

static const String & Ogre::ShadowVolumeExtrudeProgram::getProgramSource ( Light::LightTypes  lightType,
const String syntax,
bool  finite,
bool  debug 
)
static

General purpose method to get any of the program sources.

◆ initialise()

static void Ogre::ShadowVolumeExtrudeProgram::initialise ( void  )
static

Initialise the creation of these vertex programs.

◆ initialiseModulationPassPrograms()

static void Ogre::ShadowVolumeExtrudeProgram::initialiseModulationPassPrograms ( void  )
static

Initialise the creation of these modulation pass programs.

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void ptr,
void  
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void ptr,
const char ,
int  ,
const char  
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void * Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char file,
int  line,
const char func 
)
inlineinherited

array operator new, with debug line info

◆ shutdown()

static void Ogre::ShadowVolumeExtrudeProgram::shutdown ( void  )
static

Shutdown & destroy the vertex programs.

Member Data Documentation

◆ frgProgramName

String Ogre::ShadowVolumeExtrudeProgram::frgProgramName
static

◆ programNames

const String Ogre::ShadowVolumeExtrudeProgram::programNames[OGRE_NUM_SHADOW_EXTRUDER_PROGRAMS]
static

The documentation for this class was generated from the following file: