OGRE  14.3
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) override
 Called right after illuminated passes were created, so that owner of runtime generated technique can handle this. More...
 
bool beforeIlluminationPassesCleared (Ogre::Technique *tech) override
 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) override
 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...
 

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

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.

Implements Ogre::MaterialManager::Listener.

◆ afterIlluminationPassesCreated()

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

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

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: