Base class for all effects in the component. More...
Public Member Functions | |
Effect (EFFECT_TYPE type) noexcept | |
virtual | ~Effect () |
nkMemory::StringView | getName () const |
nkGraphics::Shader * | getShader () const |
EFFECT_TYPE | getType () const |
void | setName (nkMemory::StringView value) |
virtual bool | load ()=0 |
virtual void | unload ()=0 |
Base class for all effects in the component.
This class offers basic information and the general interface to access them. Effects are designed to be used within a nkGraphics::PostProcessPass. The shader they output can be used directly within the pass itself.
|
noexcept |
Constructor.
type | The underlying effect type. Provided by the calling implementation being constructed. |
|
virtual |
Destructor.
nkMemory::StringView nkAstraeus::Effect::getName | ( | ) | const |
nkGraphics::Shader* nkAstraeus::Effect::getShader | ( | ) | const |
EFFECT_TYPE nkAstraeus::Effect::getType | ( | ) | const |
void nkAstraeus::Effect::setName | ( | nkMemory::StringView | value | ) |
Sets the name of the effect.
value | The name to set. |
|
pure virtual |
Loads the effect and make it ready for rendering.
Implemented in nkAstraeus::AtmosphereEffect, nkAstraeus::SsaoEffect, nkAstraeus::FxaaEffect, nkAstraeus::ToneMappingEffect, nkAstraeus::FilmGrainEffect, nkAstraeus::ImageEnvironmentEffect, and nkAstraeus::TextureCopyEffect.
|
pure virtual |
Unloads the effect and its internal memory. After that, the effect is unusable for rendering.
Implemented in nkAstraeus::AtmosphereEffect, nkAstraeus::SsaoEffect, nkAstraeus::FxaaEffect, nkAstraeus::ToneMappingEffect, nkAstraeus::FilmGrainEffect, nkAstraeus::ImageEnvironmentEffect, and nkAstraeus::TextureCopyEffect.