Singleton class that manages creation and destruction of RenderEffect based objects.
More...
Singleton class that manages creation and destruction of RenderEffect based objects.
template<typename T >
void CEGUI::RenderEffectManager::addEffect |
( |
const String & |
name | ) |
|
Register a RenderEffect type with the system and associate it with the identifier name.
This registers a RenderEffect based class, such that instances of that
class can subsequently be created by requesting an effect using the
specified identifier.
- Template Parameters
-
T | The RenderEffect based class to be instantiated when an effect is requested using the identifier name. |
- Parameters
-
name | String object describing the identifier that the RenderEffect based class will be registered under. |
- Exceptions
-
References isEffectAvailable().
Create an instance of the RenderEffect based class identified by the specified name.
- Parameters
-
name | String object describing the identifier of the RenderEffect based class that is to be created. |
window | Pointer to a Window object. Exactly how or if this is used will depend upon the specific effect being created. |
- Returns
- Reference to the newly created RenderEffect.
- Exceptions
-
void CEGUI::RenderEffectManager::destroy |
( |
RenderEffect & |
effect | ) |
|
Destroy the given RenderEffect object.
- Note
- This function will only destroy objects that were created via the RenderEffectManager. Attempts to destroy objects created by other means will result in an InvalidRequestException. This option was chosen over silently ignoring the request in order to aid application developers in thier debugging.
- Parameters
-
effect | Reference to the RenderEffect object that is to be destroyed. |
- Exceptions
-
bool CEGUI::RenderEffectManager::isEffectAvailable |
( |
const String & |
name | ) |
const |
Return whether a RenderEffect has been registered under the specified name.
- Parameters
-
- Returns
- true if a RenderEffect with the specified name is registered.
- false if no RenderEffect with the specified name is registered.
Referenced by addEffect().
void CEGUI::RenderEffectManager::removeEffect |
( |
const String & |
name | ) |
|
Remove / unregister any RenderEffect using the specified identifier.
- Parameters
-
name | String object describing the identifier of the RenderEffect that is to be removed / unregistered. If no such RenderEffect is present, no action is taken. |
- Note
- You should avoid removing RenderEffect types that are still in use. Internally a factory system is employed for the creation and deletion of RenderEffect objects; if an effect - and therefore it's factory - is removed while instances are still active, it will not be possible to safely delete those RenderEffect object instances.