Project

General

Profile

SO3Engine

#include <SO3ShaderGenerator.h>

Inheritance diagram for SO3::SShaderGenerator:
SO3::SShaderGeneratorCG SO3::SShaderGeneratorGLES SO3::SShaderGeneratorGLSL SO3::SShaderGeneratorHLSL SO3::SShaderGeneratorUnified

Public Types

enum  ShaderType { ShaderGeneratorVP , ShaderGeneratorFP , ShaderGeneratorRTSS }
 
enum  ShaderMapType {
  MAP_DUMMY = 1 , MAP_AMBIENT = 2 , MAP_DIFFUSE = 4 , MAP_BUMP = 8 ,
  MAP_NORMAL = 16 , MAP_SPECULAR = 32 , MAP_SHININESS = 64 , MAP_EMISSIVE = 128 ,
  MAP_REFLECTION = 256 , MAP_FRESNEL = 512 , MAP_REFMASK = 1024 , MAP_OPACITY = 2048 ,
  MAP_ROUGHNESS = 4096
}
 
typedef std::list< Ogre::GpuProgramPtr > GeneratedShaders
 

Public Member Functions

 SShaderGenerator (Ogre::Technique *, Ogre::Pass *pass, ShaderType type, bool ignoreSlicePlane=false)
 
 ~SShaderGenerator ()
 
std::string GetShaderName ()
 
bool IsUvAnimated (int uvindex)
 
bool IsAlphaRejected ()
 
int GetConfig ()
 
virtual void ComputeShaderCode ()
 
virtual std::string GetUniformParams ()
 
virtual std::string GetProgram ()
 
virtual void ApplyShader ()
 

Static Public Member Functions

static void Reset ()
 

Static Public Attributes

static GeneratedShaders mGeneratedShaders
 

Protected Attributes

ShaderType mType
 
Ogre::Pass * mPass
 
Ogre::Technique * mTechnique
 
int mConfig
 
std::string mShaderName
 
std::vector< ShaderMapTypemTexTypes
 
std::vector< unsigned int > mTexUnits
 
std::vector< unsigned int > mSortedTexUnits
 
std::vector< bool > mAnimatedUv
 
std::vector< bool > mCubeUv
 
std::vector< bool > mSortedCubeUv
 
std::stringstream mSource
 
std::string mParams
 
std::string mProgram
 
float mRefTexCoef
 
bool mHighProfile
 
bool mNotLight
 
bool mUseVertexColor
 
bool mIgnoreSlicePlane
 
bool mUseAlphaRejection
 
unsigned int mNbLights
 

Detailed Description

Definition at line 41 of file SO3ShaderGenerator.h.

Member Typedef Documentation

◆ GeneratedShaders

typedef std::list<Ogre::GpuProgramPtr> SO3::SShaderGenerator::GeneratedShaders

Definition at line 44 of file SO3ShaderGenerator.h.

Member Enumeration Documentation

◆ ShaderMapType

Enumerator
MAP_DUMMY 
MAP_AMBIENT 
MAP_DIFFUSE 
MAP_BUMP 
MAP_NORMAL 
MAP_SPECULAR 
MAP_SHININESS 
MAP_EMISSIVE 
MAP_REFLECTION 
MAP_FRESNEL 
MAP_REFMASK 
MAP_OPACITY 
MAP_ROUGHNESS 

Definition at line 65 of file SO3ShaderGenerator.h.

◆ ShaderType

Enumerator
ShaderGeneratorVP 
ShaderGeneratorFP 
ShaderGeneratorRTSS 

Definition at line 58 of file SO3ShaderGenerator.h.

Constructor & Destructor Documentation

◆ SShaderGenerator()

SO3::SShaderGenerator::SShaderGenerator ( Ogre::Technique *  technique,
Ogre::Pass *  pass,
ShaderType  type,
bool  ignoreSlicePlane = false 
)

Definition at line 23 of file SO3ShaderGenerator.cpp.

◆ ~SShaderGenerator()

SO3::SShaderGenerator::~SShaderGenerator ( )

Definition at line 45 of file SO3ShaderGenerator.cpp.

Member Function Documentation

◆ ApplyShader()

void SO3::SShaderGenerator::ApplyShader ( )
virtual

◆ ComputeShaderCode()

void SO3::SShaderGenerator::ComputeShaderCode ( )
virtual

◆ GetConfig()

int SO3::SShaderGenerator::GetConfig ( )

Definition at line 50 of file SO3ShaderGenerator.cpp.

◆ GetProgram()

std::string SO3::SShaderGenerator::GetProgram ( )
virtual

◆ GetShaderName()

std::string SO3::SShaderGenerator::GetShaderName ( )

Definition at line 669 of file SO3ShaderGenerator.cpp.

◆ GetUniformParams()

std::string SO3::SShaderGenerator::GetUniformParams ( )
virtual

◆ IsAlphaRejected()

bool SO3::SShaderGenerator::IsAlphaRejected ( )

Definition at line 685 of file SO3ShaderGenerator.cpp.

◆ IsUvAnimated()

bool SO3::SShaderGenerator::IsUvAnimated ( int  uvindex)

Definition at line 674 of file SO3ShaderGenerator.cpp.

◆ Reset()

static void SO3::SShaderGenerator::Reset ( )
inlinestatic

Definition at line 47 of file SO3ShaderGenerator.h.

Member Data Documentation

◆ mAnimatedUv

std::vector<bool> SO3::SShaderGenerator::mAnimatedUv
protected

Definition at line 92 of file SO3ShaderGenerator.h.

◆ mConfig

int SO3::SShaderGenerator::mConfig
protected

Definition at line 87 of file SO3ShaderGenerator.h.

◆ mCubeUv

std::vector<bool> SO3::SShaderGenerator::mCubeUv
protected

Definition at line 93 of file SO3ShaderGenerator.h.

◆ mGeneratedShaders

SShaderGenerator::GeneratedShaders SO3::SShaderGenerator::mGeneratedShaders
static

Definition at line 45 of file SO3ShaderGenerator.h.

◆ mHighProfile

bool SO3::SShaderGenerator::mHighProfile
protected

Definition at line 99 of file SO3ShaderGenerator.h.

◆ mIgnoreSlicePlane

bool SO3::SShaderGenerator::mIgnoreSlicePlane
protected

Definition at line 102 of file SO3ShaderGenerator.h.

◆ mNbLights

unsigned int SO3::SShaderGenerator::mNbLights
protected

Definition at line 104 of file SO3ShaderGenerator.h.

◆ mNotLight

bool SO3::SShaderGenerator::mNotLight
protected

Definition at line 100 of file SO3ShaderGenerator.h.

◆ mParams

std::string SO3::SShaderGenerator::mParams
protected

Definition at line 96 of file SO3ShaderGenerator.h.

◆ mPass

Ogre::Pass* SO3::SShaderGenerator::mPass
protected

Definition at line 85 of file SO3ShaderGenerator.h.

◆ mProgram

std::string SO3::SShaderGenerator::mProgram
protected

Definition at line 97 of file SO3ShaderGenerator.h.

◆ mRefTexCoef

float SO3::SShaderGenerator::mRefTexCoef
protected

Definition at line 98 of file SO3ShaderGenerator.h.

◆ mShaderName

std::string SO3::SShaderGenerator::mShaderName
protected

Definition at line 88 of file SO3ShaderGenerator.h.

◆ mSortedCubeUv

std::vector<bool> SO3::SShaderGenerator::mSortedCubeUv
protected

Definition at line 94 of file SO3ShaderGenerator.h.

◆ mSortedTexUnits

std::vector<unsigned int> SO3::SShaderGenerator::mSortedTexUnits
protected

Definition at line 91 of file SO3ShaderGenerator.h.

◆ mSource

std::stringstream SO3::SShaderGenerator::mSource
protected

Definition at line 95 of file SO3ShaderGenerator.h.

◆ mTechnique

Ogre::Technique* SO3::SShaderGenerator::mTechnique
protected

Definition at line 86 of file SO3ShaderGenerator.h.

◆ mTexTypes

std::vector<ShaderMapType> SO3::SShaderGenerator::mTexTypes
protected

Definition at line 89 of file SO3ShaderGenerator.h.

◆ mTexUnits

std::vector<unsigned int> SO3::SShaderGenerator::mTexUnits
protected

Definition at line 90 of file SO3ShaderGenerator.h.

◆ mType

ShaderType SO3::SShaderGenerator::mType
protected

Definition at line 84 of file SO3ShaderGenerator.h.

◆ mUseAlphaRejection

bool SO3::SShaderGenerator::mUseAlphaRejection
protected

Definition at line 103 of file SO3ShaderGenerator.h.

◆ mUseVertexColor

bool SO3::SShaderGenerator::mUseVertexColor
protected

Definition at line 101 of file SO3ShaderGenerator.h.


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