Gamedev Framework (gf)
0.3.0
A C++11 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, RenderStates states) override |
Draw the object to a render target. More... | |
Public Member Functions inherited from gf::Drawable | |
virtual | ~Drawable () |
Virtual desctructor. 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 froma 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 |