OGRE
1.11.6
Object-Oriented Graphics Rendering Engine
|
This class demonstrates basic usage of the RTShader system. More...
#include <OgreSGTechniqueResolverListener.h>
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::Technique * | 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. More... | |
virtual Technique * | handleSchemeNotFound (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... | |
This class demonstrates basic usage of the RTShader system.
It sub class the material manager listener class and 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.
|
explicit |
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.
|
virtual |
Called right after illuminated passes were created, so that owner of runtime generated technique can handle this.
Reimplemented from Ogre::MaterialManager::Listener.
|
virtual |
Called right before illuminated passes would be removed, so that owner of runtime generated technique can handle this.
Reimplemented from Ogre::MaterialManager::Listener.
|
pure virtualinherited |
Called if a technique for a given scheme is not found within a material, allows the application to specify a Technique instance manually.
schemeIndex | The index of the scheme that was requested - all schemes have a unique index when created that does not alter. |
schemeName | The friendly name of the scheme being requested |
originalMaterial | The material that is being processed, that didn't have a specific technique for this scheme |
lodIndex | The material level-of-detail that was being asked for, in case you need to use it to determine a technique. |
rend | Pointer to the Renderable that is requesting this technique to be used, so this may influence your choice of Technique. May be null if the technique isn't being requested in that context. |