OGRE 2.3.3
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 *)
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
void * operator new (size_t sz, void *ptr)
 placement operator new
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

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
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);
}
Definition OgreShaderPrimitives.h:74
Definition OgreShaderPrimitives.h:87

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

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

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

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

◆ getDirectionalLightExtruderArbvp1Debug()

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

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

◆ getDirectionalLightExtruderArbvp1Finite()

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

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

◆ getDirectionalLightExtruderArbvp1FiniteDebug()

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

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

◆ getDirectionalLightExtruderVs_1_1()

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

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

◆ getDirectionalLightExtruderVs_1_1Debug()

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

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

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

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

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

◆ getDirectionalLightExtruderVs_4_0Debug()

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

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

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

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

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

◆ getDirectionalLightExtruderVs_glslDebug()

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

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

◆ getDirectionalLightExtruderVs_glsles()

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

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

◆ getDirectionalLightExtruderVs_glslesDebug()

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

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

◆ getDirectionalLightExtruderVs_glslesFinite()

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

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

◆ getDirectionalLightExtruderVs_glslesFiniteDebug()

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

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

◆ getDirectionalLightExtruderVs_glslFinite()

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

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

◆ getDirectionalLightExtruderVs_glslFiniteDebug()

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

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

◆ getPointLightExtruderArbvp1()

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

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

◆ getPointLightExtruderArbvp1Debug()

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

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

◆ getPointLightExtruderArbvp1Finite()

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

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

◆ getPointLightExtruderArbvp1FiniteDebug()

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

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

◆ getPointLightExtruderVs_1_1()

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

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

◆ getPointLightExtruderVs_1_1Debug()

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

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

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

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

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

◆ getPointLightExtruderVs_4_0Debug()

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

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

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

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

◆ getPointLightExtruderVs_glsl()

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

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

◆ getPointLightExtruderVs_glslDebug()

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

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

◆ getPointLightExtruderVs_glsles()

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

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

◆ getPointLightExtruderVs_glslesDebug()

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

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

◆ getPointLightExtruderVs_glslesFinite()

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

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

◆ getPointLightExtruderVs_glslesFiniteDebug()

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

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

◆ getPointLightExtruderVs_glslFinite()

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

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

◆ getPointLightExtruderVs_glslFiniteDebug()

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

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

◆ getProgramName()

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

◆ getProgramSource()

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

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

Initialise the creation of these vertex programs.

◆ initialiseModulationPassPrograms()

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

Initialise the creation of these modulation pass programs.

◆ operator delete() [1/3]

void Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator delete ( void * ptr)
inlineinherited

◆ operator delete() [2/3]

void Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator delete ( void * ptr,
const char * ,
int ,
const char *  )
inlineinherited

◆ operator delete() [3/3]

void Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator delete ( void * ptr,
void *  )
inlineinherited

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

void Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator delete[] ( void * ptr)
inlineinherited

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

void Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator delete[] ( void * ptr,
const char * ,
int ,
const char *  )
inlineinherited

◆ operator new() [1/3]

void * Ogre::AllocatedObject< SceneCtlAllocPolicy >::operator new ( size_t sz)
inlineinherited

◆ operator new() [2/3]

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

operator new, with debug line info

◆ operator new() [3/3]

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

placement operator new

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

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

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

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

array operator new, with debug line info

◆ shutdown()

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: