Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
gazebo::rendering::GBufferSchemeHandler Class Reference

Class for handling materials who did not specify techniques for rendering themselves into the GBuffer. More...

#include <GBufferSchemeHandler.hh>

Inheritance diagram for gazebo::rendering::GBufferSchemeHandler:
Inheritance graph
[legend]

Classes

struct  PassProperties
 A structure for containing the properties of a material, relevant to GBuffer rendering. More...
 

Public Member Functions

 GBufferSchemeHandler (GBufferMaterialGenerator::GBufferType _type)
 
virtual Ogre::Technique * handleSchemeNotFound (uint16_t _schemeIndex, const Ogre::String &_schemeName, Ogre::Material *_originalMaterial, uint16_t _lodIndex, const Ogre::Renderable *_rend)
 

Protected Member Functions

bool CheckNormalMap (Ogre::TextureUnitState *_tus, PassProperties &_props)
 Check if a texture is a normal map, and fill property sheet accordingly. More...
 
void FillPass (Ogre::Pass *_gBufferPass, Ogre::Pass *_originalPass, const PassProperties &_props)
 Fill a pass with the specific data from the pass it is based on. More...
 
MaterialGenerator::Perm GetPermutation (const PassProperties &_props)
 Get the permutation of material flags that fit a certain property sheet. More...
 
PassProperties InspectPass (Ogre::Pass *_pass, uint16_t _lodIndex, const Ogre::Renderable *_rend)
 Inspect a technique and return its relevant properties. More...
 

Protected Attributes

GBufferMaterialGenerator materialGenerator
 The material generator. More...
 
GBufferMaterialGenerator::GBufferType type
 

Static Protected Attributes

static const std::string normal_map_pattern
 

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.

Constructor & Destructor Documentation

gazebo::rendering::GBufferSchemeHandler::GBufferSchemeHandler ( GBufferMaterialGenerator::GBufferType  _type)
inline

Member Function Documentation

bool gazebo::rendering::GBufferSchemeHandler::CheckNormalMap ( Ogre::TextureUnitState *  _tus,
PassProperties _props 
)
protected

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

void gazebo::rendering::GBufferSchemeHandler::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.

MaterialGenerator::Perm gazebo::rendering::GBufferSchemeHandler::GetPermutation ( const PassProperties _props)
protected

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

virtual Ogre::Technique* gazebo::rendering::GBufferSchemeHandler::handleSchemeNotFound ( uint16_t  _schemeIndex,
const Ogre::String &  _schemeName,
Ogre::Material *  _originalMaterial,
uint16_t  _lodIndex,
const Ogre::Renderable *  _rend 
)
virtual
PassProperties gazebo::rendering::GBufferSchemeHandler::InspectPass ( Ogre::Pass *  _pass,
uint16_t  _lodIndex,
const Ogre::Renderable *  _rend 
)
protected

Inspect a technique and return its relevant properties.

Member Data Documentation

GBufferMaterialGenerator gazebo::rendering::GBufferSchemeHandler::materialGenerator
protected

The material generator.

const std::string gazebo::rendering::GBufferSchemeHandler::normal_map_pattern
staticprotected
GBufferMaterialGenerator::GBufferType gazebo::rendering::GBufferSchemeHandler::type
protected

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