Listener on any general material events.
More...
#include <OgreMaterialManager.h>
|
virtual | ~Listener () |
| Virtual destructor needed as class has virtual methods.
|
|
virtual bool | afterIlluminationPassesCreated (Technique *technique) |
| Called right after illuminated passes were created, so that owner of runtime generated technique can handle this.
|
|
virtual bool | beforeIlluminationPassesCleared (Technique *technique) |
| Called right before illuminated passes would be removed, so that owner of runtime generated technique can handle this.
|
|
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.
|
|
Listener on any general material events.
- See also
- MaterialManager::addListener
◆ ~Listener()
virtual Ogre::MaterialManager::Listener::~Listener |
( |
| ) |
|
|
inlinevirtual |
Virtual destructor needed as class has virtual methods.
◆ afterIlluminationPassesCreated()
virtual bool Ogre::MaterialManager::Listener::afterIlluminationPassesCreated |
( |
Technique * |
technique | ) |
|
|
inlinevirtual |
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.
◆ beforeIlluminationPassesCleared()
virtual bool Ogre::MaterialManager::Listener::beforeIlluminationPassesCleared |
( |
Technique * |
technique | ) |
|
|
inlinevirtual |
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.
◆ handleSchemeNotFound()
virtual Technique * Ogre::MaterialManager::Listener::handleSchemeNotFound |
( |
unsigned short |
schemeIndex, |
|
|
const String & |
schemeName, |
|
|
Material * |
originalMaterial, |
|
|
unsigned short |
lodIndex, |
|
|
const Renderable * |
rend |
|
) |
| |
|
pure virtual |
Called if a technique for a given scheme is not found within a material, allows the application to specify a Technique instance manually.
- This callback allows you to handle the case where a scheme is requested but the material doesn't have an entry for it. You can return a Technique pointer from this method to specify the material technique you'd like to be applied instead, which can be from another material entirely (and probably will be). Note that it is critical that you only return a Technique that is supported on this hardware; there are utility methods like Material::getBestTechnique to help you with this.
- Parameters
-
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. |
- Returns
- A pointer to the technique to be used, or NULL if you wish to use the default technique for this material
The documentation for this class was generated from the following file: