OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
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 *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 

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. More...
 
static const StringgetDirectionalLightExtruderArbvp1 ()
 Get extruder program source for directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1Debug ()
 Get extruder program source for debug directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1Finite ()
 Get FINITE extruder program source for directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderArbvp1FiniteDebug ()
 Get FINITE extruder program source for debug directional lights, compatible with arbvp1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1 ()
 Get extruder program source for directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1Debug ()
 Get extruder program source for debug directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1Finite ()
 Get FINITE extruder program source for directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_1_1FiniteDebug ()
 Get FINITE extruder program source for debug directional lights, compatible with vs_1_1. More...
 
static const StringgetDirectionalLightExtruderVs_4_0 ()
 Get extruder program source for directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0Debug ()
 Get extruder program source for debug directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0Finite ()
 Get FINITE extruder program source for directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_4_0FiniteDebug ()
 Get FINITE extruder program source for debug directional lights, compatible with vs_4_0. More...
 
static const StringgetDirectionalLightExtruderVs_glsl ()
 Get extruder program source for directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glslDebug ()
 Get extruder program source for debug directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glsles ()
 Get extruder program source for directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesDebug ()
 Get extruder program source for debug directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesFinite ()
 Get FINITE extruder program source for directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslesFiniteDebug ()
 Get FINITE extruder program source for debug directional lights, compatible with glsles. More...
 
static const StringgetDirectionalLightExtruderVs_glslFinite ()
 Get FINITE extruder program source for directional lights, compatible with glsl. More...
 
static const StringgetDirectionalLightExtruderVs_glslFiniteDebug ()
 Get FINITE extruder program source for debug directional lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderArbvp1 ()
 Get extruder program source for point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1Debug ()
 Get extruder program source for debug point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1Finite ()
 Get FINITE extruder program source for point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderArbvp1FiniteDebug ()
 Get FINITE extruder program source for debug point lights, compatible with arbvp1. More...
 
static const StringgetPointLightExtruderVs_1_1 ()
 Get extruder program source for point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1Debug ()
 Get extruder program source for debug point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1Finite ()
 Get FINITE extruder program source for point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_1_1FiniteDebug ()
 Get extruder program source for debug point lights, compatible with vs_1_1. More...
 
static const StringgetPointLightExtruderVs_4_0 ()
 Get extruder program source for point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0Debug ()
 Get extruder program source for debug point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0Finite ()
 Get FINITE extruder program source for point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_4_0FiniteDebug ()
 Get extruder program source for debug point lights, compatible with vs_4_0. More...
 
static const StringgetPointLightExtruderVs_glsl ()
 Get extruder program source for point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glslDebug ()
 Get extruder program source for debug point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glsles ()
 Get extruder program source for point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesDebug ()
 Get extruder program source for debug point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesFinite ()
 Get FINITE extruder program source for point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslesFiniteDebug ()
 Get extruder program source for debug point lights, compatible with glsles. More...
 
static const StringgetPointLightExtruderVs_glslFinite ()
 Get FINITE extruder program source for point lights, compatible with glsl. More...
 
static const StringgetPointLightExtruderVs_glslFiniteDebug ()
 Get extruder program source for debug point lights, compatible with glsl. More...
 
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. More...
 
static void initialise ()
 Initialise the creation of these vertex programs. More...
 
static void initialiseModulationPassPrograms ()
 Initialise the creation of these modulation pass programs. More...
 
static void shutdown ()
 Shutdown & destroy the vertex programs. More...
 

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
void shadowVolumeExtrudePointLight_vp (
float4 position : POSITION,
float wcoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProjMatrix,
uniform float4 lightPos // homogeneous, object space
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
float4 newpos =
(wcoord.xxxx * lightPos) +
float4(position.xyz - lightPos.xyz, 0);
oPosition = mul(worldViewProjMatrix, newpos);
}
// Directional light extrude
void shadowVolumeExtrudeDirLight_vp (
float4 position : POSITION,
float wcoord : TEXCOORD0,
out float4 oPosition : POSITION,
uniform float4x4 worldViewProjMatrix,
uniform float4 lightPos // homogenous, object space
)
{
// extrusion in object space
// vertex unmodified if w==1, extruded if w==0
float4 newpos =
(wcoord.xxxx * (position + lightPos)) - lightPos;
oPosition = mul(worldViewProjMatrix, newpos);
}
// 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);
}

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 ( )
inlinestatic

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

◆ getDirectionalLightExtruderArbvp1Debug()

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

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

◆ getDirectionalLightExtruderArbvp1Finite()

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

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

◆ getDirectionalLightExtruderArbvp1FiniteDebug()

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

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

◆ getDirectionalLightExtruderVs_1_1()

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

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

◆ getDirectionalLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_1_1Debug ( )
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 ( )
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 ( )
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 ( )
inlinestatic

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

◆ getDirectionalLightExtruderVs_4_0Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getDirectionalLightExtruderVs_4_0Debug ( )
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 ( )
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 ( )
inlinestatic

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

◆ getDirectionalLightExtruderVs_glsl()

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

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

◆ getDirectionalLightExtruderVs_glslDebug()

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

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

◆ getDirectionalLightExtruderVs_glsles()

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

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

◆ getDirectionalLightExtruderVs_glslesDebug()

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

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

◆ getDirectionalLightExtruderVs_glslesFinite()

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

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

◆ getDirectionalLightExtruderVs_glslesFiniteDebug()

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

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

◆ getDirectionalLightExtruderVs_glslFinite()

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

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

◆ getDirectionalLightExtruderVs_glslFiniteDebug()

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

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

◆ getPointLightExtruderArbvp1()

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

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

◆ getPointLightExtruderArbvp1Debug()

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

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

◆ getPointLightExtruderArbvp1Finite()

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

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

◆ getPointLightExtruderArbvp1FiniteDebug()

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

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

◆ getPointLightExtruderVs_1_1()

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

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

◆ getPointLightExtruderVs_1_1Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_1_1Debug ( )
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 ( )
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 ( )
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 ( )
inlinestatic

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

◆ getPointLightExtruderVs_4_0Debug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_4_0Debug ( )
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 ( )
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 ( )
inlinestatic

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

◆ getPointLightExtruderVs_glsl()

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

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

◆ getPointLightExtruderVs_glslDebug()

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

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

◆ getPointLightExtruderVs_glsles()

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

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

◆ getPointLightExtruderVs_glslesDebug()

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

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

◆ getPointLightExtruderVs_glslesFinite()

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

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

◆ getPointLightExtruderVs_glslesFiniteDebug()

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

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

◆ getPointLightExtruderVs_glslFinite()

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

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

◆ getPointLightExtruderVs_glslFiniteDebug()

static const String& Ogre::ShadowVolumeExtrudeProgram::getPointLightExtruderVs_glslFiniteDebug ( )
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 ( )
static

Initialise the creation of these vertex programs.

◆ initialiseModulationPassPrograms()

static void Ogre::ShadowVolumeExtrudeProgram::initialiseModulationPassPrograms ( )
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 ( )
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: