Base class for all complex effects in the component. More...
Public Member Functions | |
ComplexEffect (COMPLEX_EFFECT_TYPE type) noexcept | |
virtual | ~ComplexEffect () |
nkMemory::StringView | getName () const |
nkGraphics::CompositorNode * | getCompositorNode () const |
COMPLEX_EFFECT_TYPE | getType () const |
void | setName (nkMemory::StringView value) |
void | setCompositorNode (nkGraphics::CompositorNode *value) |
virtual bool | load ()=0 |
virtual void | unload ()=0 |
Base class for all complex effects in the component.
This class offers basic information and the general interface to access them. Complex effects are like Effect instances, with the difference that they require a more complex rendering logic. This can include multi-pass rendering or custom CPU logic needed before each frame.
As such, ComplexEffects are designed to be used within nkGraphics::CompositorNode instances where they will be able to append multiple operations.
|
noexcept |
Constructor. See ComplexEffectManager::createOrRetrieve(), or each complex effect type's create method.
type | The complex effect type, fed internally by the actual implementation being created. |
|
virtual |
Destructor.
nkMemory::StringView nkAstraeus::ComplexEffect::getName | ( | ) | const |
nkGraphics::CompositorNode* nkAstraeus::ComplexEffect::getCompositorNode | ( | ) | const |
COMPLEX_EFFECT_TYPE nkAstraeus::ComplexEffect::getType | ( | ) | const |
void nkAstraeus::ComplexEffect::setName | ( | nkMemory::StringView | value | ) |
Sets the name of the effect.
value | The name to set. |
void nkAstraeus::ComplexEffect::setCompositorNode | ( | nkGraphics::CompositorNode * | value | ) |
Sets the node in which the effect should add its required rendering steps. Typically, a CompositorNode can be allocated within the Compositor where needed, and passed to the effect for it to populate it.
value | The node the effect has to work in. |
|
pure virtual |
Loads the effect and make it ready for rendering. After a successful call, this means the compositor node will be populated with the relevant data.
Implemented in nkAstraeus::DofComplexEffect, and nkAstraeus::BlurComplexEffect.
|
pure virtual |
Unloads the effect and its internal memory. After that, the effect is unusable for rendering. The compositor node specified will be cleaned from all linked operations.
Implemented in nkAstraeus::DofComplexEffect, and nkAstraeus::BlurComplexEffect.