OGRE: OgreBites::SGTechniqueResolverListener Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
OgreBites::SGTechniqueResolverListener Class Reference
Optional Components » Bites

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

`#include <OgreSGTechniqueResolverListener.h>`

Inheritance diagram for OgreBites::SGTechniqueResolverListener:
[legend]

## 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.
bool | beforeIlluminationPassesCleared (Ogre::Technique *tech) override
| Called right before illuminated passes would be removed, so that owner of runtime generated technique can handle this.
Ogre::Technique * | handleSchemeNotFound (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.
Public Member Functions inherited from Ogre::MaterialManager::Listener
virtual | ~Listener ()
| Virtual destructor needed as class has virtual methods.

## 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:

- OgreSGTechniqueResolverListener.h