Project

General

Profile

SO3Engine

#include <SO3GBufferSchemeHandler.h>

Inheritance diagram for SO3::SGBufferSchemeHandler:

Classes

struct  PassProperties
 

Public Member Functions

 SGBufferSchemeHandler (SGBufferMaterialGenerator *materialGeneratorInstance)
 
virtual Ogre::Technique * handleSchemeNotFound (unsigned short schemeIndex, const Ogre::String &schemeName, Ogre::Material *originalMaterial, unsigned short lodIndex, const Ogre::Renderable *rend)
 

Protected Member Functions

PassProperties InspectPass (Ogre::Pass *pass, unsigned short lodIndex, const Ogre::Renderable *rend)
 
SGBufferMaterialPermutation GetPermutation (const PassProperties &props)
 
void FillPass (Ogre::Pass *gBufferPass, Ogre::Pass *originalPass, const PassProperties &props)
 
bool CheckNormalMap (Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
 
bool CheckSpecularMap (Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
 
bool CheckLightMap (Ogre::TextureUnitState *tus, PassProperties &props, const Ogre::String &lowerCaseName, const Ogre::String &lowerCaseAlias, const Ogre::String &lowerCaseFileName)
 

Protected Attributes

SGBufferMaterialGeneratormaterialGenerator
 

Static Protected Attributes

static const Ogre::String NORMAL_MAP_PATTERN1 = "normal"
 
static const Ogre::String NORMAL_MAP_PATTERN2 = "_nrm"
 
static const Ogre::String NORMAL_MAP_PATTERN3 = "_norm"
 
static const Ogre::String NORMAL_MAP_PATTERN4 = "_nm"
 
static const Ogre::String NORMAL_MAP_PATTERN5 = "_nrm"
 
static const Ogre::String NORMAL_MAP_PATTERN6 = "_nmap"
 
static const Ogre::String NORMAL_MAP_PATTERN7 = "bump"
 
static const Ogre::String SPECULAR_MAP_PATTERN1 = "specular"
 
static const Ogre::String SPECULAR_MAP_PATTERN2 = "_spec"
 
static const Ogre::String LIGHT_MAP_PATTERN1 = "lightmap"
 
static const Ogre::String LIGHT_MAP_PATTERN2 = "light_map"
 
static const Ogre::String LIGHT_MAP_PATTERN3 = "_light"
 

Detailed Description

Class for handling materials who did not specify techniques for rendering themselves into the GBuffer. This class allows deferred shading to be used, without having to specify new techniques for all the objects in the scene.

Note
This does not support all the possible rendering techniques out there. in order to support more, either expand this class or specify the techniques in the materials.

Definition at line 42 of file SO3GBufferSchemeHandler.h.

Constructor & Destructor Documentation

◆ SGBufferSchemeHandler()

SO3::SGBufferSchemeHandler::SGBufferSchemeHandler ( SGBufferMaterialGenerator materialGeneratorInstance)

Definition at line 51 of file SO3GBufferSchemeHandler.cpp.

Member Function Documentation

◆ CheckLightMap()

bool SO3::SGBufferSchemeHandler::CheckLightMap ( Ogre::TextureUnitState *  tus,
SGBufferSchemeHandler::PassProperties props,
const Ogre::String &  lowerCaseName,
const Ogre::String &  lowerCaseAlias,
const Ogre::String &  lowerCaseFileName 
)
protected

Check if a texture is a light map, and fill property sheet accordingly

Definition at line 291 of file SO3GBufferSchemeHandler.cpp.

◆ CheckNormalMap()

bool SO3::SGBufferSchemeHandler::CheckNormalMap ( Ogre::TextureUnitState *  tus,
SGBufferSchemeHandler::PassProperties props,
const Ogre::String &  lowerCaseName,
const Ogre::String &  lowerCaseAlias,
const Ogre::String &  lowerCaseFileName 
)
protected

Check if a texture is a normal map, and fill property sheet accordingly

Definition at line 204 of file SO3GBufferSchemeHandler.cpp.

◆ CheckSpecularMap()

bool SO3::SGBufferSchemeHandler::CheckSpecularMap ( Ogre::TextureUnitState *  tus,
SGBufferSchemeHandler::PassProperties props,
const Ogre::String &  lowerCaseName,
const Ogre::String &  lowerCaseAlias,
const Ogre::String &  lowerCaseFileName 
)
protected

Check if a texture is a specular map, and fill property sheet accordingly

Definition at line 252 of file SO3GBufferSchemeHandler.cpp.

◆ FillPass()

void SO3::SGBufferSchemeHandler::FillPass ( Ogre::Pass *  gBufferPass,
Ogre::Pass *  originalPass,
const PassProperties props 
)
protected

Fill a pass with the specific data from the pass it is based on

Definition at line 399 of file SO3GBufferSchemeHandler.cpp.

◆ GetPermutation()

SGBufferMaterialPermutation SO3::SGBufferSchemeHandler::GetPermutation ( const PassProperties props)
protected

Get the permutation of material flags that fit a certain property sheet

Definition at line 336 of file SO3GBufferSchemeHandler.cpp.

◆ handleSchemeNotFound()

Ogre::Technique * SO3::SGBufferSchemeHandler::handleSchemeNotFound ( unsigned short  schemeIndex,
const Ogre::String &  schemeName,
Ogre::Material *  originalMaterial,
unsigned short  lodIndex,
const Ogre::Renderable *  rend 
)
virtual

Definition at line 61 of file SO3GBufferSchemeHandler.cpp.

◆ InspectPass()

SGBufferSchemeHandler::PassProperties SO3::SGBufferSchemeHandler::InspectPass ( Ogre::Pass *  pass,
unsigned short  lodIndex,
const Ogre::Renderable *  rend 
)
protected

Inspect a technique and return its relevant properties

Definition at line 135 of file SO3GBufferSchemeHandler.cpp.

Member Data Documentation

◆ LIGHT_MAP_PATTERN1

const Ogre::String SO3::SGBufferSchemeHandler::LIGHT_MAP_PATTERN1 = "lightmap"
staticprotected

Definition at line 55 of file SO3GBufferSchemeHandler.h.

◆ LIGHT_MAP_PATTERN2

const Ogre::String SO3::SGBufferSchemeHandler::LIGHT_MAP_PATTERN2 = "light_map"
staticprotected

Definition at line 56 of file SO3GBufferSchemeHandler.h.

◆ LIGHT_MAP_PATTERN3

const Ogre::String SO3::SGBufferSchemeHandler::LIGHT_MAP_PATTERN3 = "_light"
staticprotected

Definition at line 57 of file SO3GBufferSchemeHandler.h.

◆ materialGenerator

SGBufferMaterialGenerator* SO3::SGBufferSchemeHandler::materialGenerator
protected

Definition at line 59 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN1

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN1 = "normal"
staticprotected

Definition at line 46 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN2

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN2 = "_nrm"
staticprotected

Definition at line 47 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN3

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN3 = "_norm"
staticprotected

Definition at line 48 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN4

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN4 = "_nm"
staticprotected

Definition at line 49 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN5

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN5 = "_nrm"
staticprotected

Definition at line 50 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN6

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN6 = "_nmap"
staticprotected

Definition at line 51 of file SO3GBufferSchemeHandler.h.

◆ NORMAL_MAP_PATTERN7

const Ogre::String SO3::SGBufferSchemeHandler::NORMAL_MAP_PATTERN7 = "bump"
staticprotected

Definition at line 52 of file SO3GBufferSchemeHandler.h.

◆ SPECULAR_MAP_PATTERN1

const Ogre::String SO3::SGBufferSchemeHandler::SPECULAR_MAP_PATTERN1 = "specular"
staticprotected

Definition at line 53 of file SO3GBufferSchemeHandler.h.

◆ SPECULAR_MAP_PATTERN2

const Ogre::String SO3::SGBufferSchemeHandler::SPECULAR_MAP_PATTERN2 = "_spec"
staticprotected

Definition at line 54 of file SO3GBufferSchemeHandler.h.


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