![]() |
Gamedev Framework (gf) 1.2.0
A C++17 framework for 2D games
|
A post-processing drawable. More...
#include <gf/PostProcessing.h>

Public Member Functions | |
| PostProcessing () | |
| Default constructor. More... | |
| void | setTexture (const Texture &texture) |
| Set the source texture. More... | |
| void | setTextureRect (const RectF &textureRect) |
| Set the texture rectangle. More... | |
| void | setEffect (Effect &effect) |
| Set the effect to apply. More... | |
| virtual void | draw (RenderTarget &target, const RenderStates &states) override |
| Draw the object to a render target. More... | |
Public Member Functions inherited from gf::Drawable | |
| virtual | ~Drawable () |
| Virtual desctructor. More... | |
| virtual void | draw (RenderTarget &target, const RenderStates &states)=0 |
| Draw the object to a render target. More... | |
A post-processing drawable.
This class is a light-weight object to apply a post-processing effect to a texture. The texture generally comes from a gf::RenderTexture.
| gf::PostProcessing::PostProcessing | ( | ) |
Default constructor.
|
overridevirtual |
Draw the object to a render target.
This is a pure virtual function that has to be implemented by the derived class to define how the drawable should be drawn.
| target | Render target to draw to |
| states | Current render states |
Implements gf::Drawable.
|
inline |
Set the effect to apply.
| effect | The post-processing effect |
| void gf::PostProcessing::setTexture | ( | const Texture & | texture | ) |
Set the source texture.
| texture | The source texture |
| void gf::PostProcessing::setTextureRect | ( | const RectF & | textureRect | ) |
Set the texture rectangle.
| textureRect | The texture rectangle |