Gamedev Framework (gf)  0.3.0
A C++11 framework for 2D games
Public Member Functions | List of all members
gf::PostProcessing Class Reference

A post-processing drawable. More...

#include <gf/PostProcessing.h>

Inheritance diagram for gf::PostProcessing:
Inheritance graph
[legend]

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...
 

Detailed Description

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.

See also
gf::RenderTexture

Constructor & Destructor Documentation

gf::PostProcessing::PostProcessing ( )

Default constructor.

Member Function Documentation

virtual void gf::PostProcessing::draw ( RenderTarget target,
RenderStates  states 
)
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.

Parameters
targetRender target to draw to
statesCurrent render states

Implements gf::Drawable.

void gf::PostProcessing::setEffect ( Effect effect)
inline

Set the effect to apply.

Parameters
effectThe post-processing effect
void gf::PostProcessing::setTexture ( const Texture texture)

Set the source texture.

Parameters
textureThe source texture
void gf::PostProcessing::setTextureRect ( const RectF textureRect)

Set the texture rectangle.

Parameters
textureRectThe texture rectangle