OGRE  1.12.12
Object-Oriented Graphics Rendering Engine
OgreBites::SGTechniqueResolverListener Class Reference

Default implementation of a Listener to use with the Ogre::RTShader system. More...

#include <OgreSGTechniqueResolverListener.h>

+ Inheritance diagram for OgreBites::SGTechniqueResolverListener:

Public Member Functions

 SGTechniqueResolverListener (Ogre::RTShader::ShaderGenerator *pShaderGenerator)
 
bool afterIlluminationPassesCreated (Ogre::Technique *tech)
 Called right after illuminated passes were created, so that owner of runtime generated technique can handle this. More...
 
bool beforeIlluminationPassesCleared (Ogre::Technique *tech)
 Called right before illuminated passes would be removed, so that owner of runtime generated technique can handle this. More...
 
Ogre::TechniquehandleSchemeNotFound (unsigned short schemeIndex, const Ogre::String &schemeName, Ogre::Material *originalMaterial, unsigned short lodIndex, const Ogre::Renderable *rend)
 This is the hook point where shader based technique will be created. More...
 
- Public Member Functions inherited from Ogre::MaterialManager::Listener
virtual ~Listener ()
 Virtual destructor needed as class has virtual methods. More...
 
virtual TechniquehandleSchemeNotFound (unsigned short schemeIndex, const String &schemeName, Material *originalMaterial, unsigned short lodIndex, const Renderable *rend)=0
 Called if a technique for a given scheme is not found within a material, allows the application to specify a Technique instance manually. More...
 

Detailed Description

Default implementation of a Listener to use with the Ogre::RTShader system.

When a target scheme callback is invoked with the shader generator scheme it tries to create an equivalent shader based technique based on the default technique of the given material.

Constructor & Destructor Documentation

◆ SGTechniqueResolverListener()

OgreBites::SGTechniqueResolverListener::SGTechniqueResolverListener ( Ogre::RTShader::ShaderGenerator pShaderGenerator)
explicit

Member Function Documentation

◆ handleSchemeNotFound()

Ogre::Technique* OgreBites::SGTechniqueResolverListener::handleSchemeNotFound ( unsigned short  schemeIndex,
const Ogre::String schemeName,
Ogre::Material originalMaterial,
unsigned short  lodIndex,
const Ogre::Renderable rend 
)

This is the hook point where shader based technique will be created.

It will be called whenever the material manager won't find appropriate technique that satisfy the target scheme name. If the scheme name is out target RT Shader System scheme name we will try to create shader generated technique for it.

◆ afterIlluminationPassesCreated()

bool OgreBites::SGTechniqueResolverListener::afterIlluminationPassesCreated ( Ogre::Technique technique)
virtual

Called right after illuminated passes were created, so that owner of runtime generated technique can handle this.

Returns
True if notification is handled and should not be propagated further.

Reimplemented from Ogre::MaterialManager::Listener.

◆ beforeIlluminationPassesCleared()

bool OgreBites::SGTechniqueResolverListener::beforeIlluminationPassesCleared ( Ogre::Technique technique)
virtual

Called right before illuminated passes would be removed, so that owner of runtime generated technique can handle this.

Returns
True if notification is handled and should not be propagated further.

Reimplemented from Ogre::MaterialManager::Listener.


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