sfPostFX Class Reference

#include <PostFX.hpp>

Inheritance diagram for sfPostFX:

sfDrawable sfVideoResource sfNonCopyable List of all members.

Public Member Functions

 sfPostFX ()
 sfPostFX (const std::string &Filename)
 ~sfPostFX ()
void LoadFromFile (const std::string &Filename)
void SetParameter (const std::string &Name, float X)
void SetParameter (const std::string &Name, float X, float Y)
void SetParameter (const std::string &Name, float X, float Y, float Z)
void SetParameter (const std::string &Name, float X, float Y, float Z, float W)
void SetTexture (const std::string &Name, sfImage *Image)

Protected Member Functions

virtual void Render (sfRenderWindow &Window)

Detailed Description

sfPostFX is used to apply a post effect to a window

Definition at line 41 of file PostFX.hpp.


Constructor & Destructor Documentation

sfPostFX::sfPostFX (  ) 

Default constructor

Definition at line 41 of file PostFX.cpp.

sfPostFX::sfPostFX ( const std::string &  Filename  ) 

Construct the post-fx from an effect file

Parameters:
Filename : Path of the effect file to load

Definition at line 51 of file PostFX.cpp.

References LoadFromFile().

sfPostFX::~sfPostFX (  ) 

Destructor

Definition at line 61 of file PostFX.cpp.


Member Function Documentation

void sfPostFX::LoadFromFile ( const std::string &  Filename  ) 

Load the effect from a file

Parameters:
Filename : Path of the effect file to load

Definition at line 70 of file PostFX.cpp.

Referenced by sfPostFX().

void sfPostFX::SetParameter ( const std::string &  Name,
float  X 
)

Change a parameter of the effect (1 float)

Parameters:
Name : Parameter name in the effect
X : Value to assign

Definition at line 84 of file PostFX.cpp.

void sfPostFX::SetParameter ( const std::string &  Name,
float  X,
float  Y 
)

Change a parameter of the effect (2 floats)

Parameters:
Name : Parameter name in the effect
X,Y : Values to assign

Definition at line 107 of file PostFX.cpp.

void sfPostFX::SetParameter ( const std::string &  Name,
float  X,
float  Y,
float  Z 
)

Change a parameter of the effect (3 floats)

Parameters:
Name : Parameter name in the effect
X,Y,Z : Values to assign

Definition at line 130 of file PostFX.cpp.

void sfPostFX::SetParameter ( const std::string &  Name,
float  X,
float  Y,
float  Z,
float  W 
)

Change a parameter of the effect (4 floats)

Parameters:
Name : Parameter name in the effect
X,Y,Z,W : Values to assign

Definition at line 153 of file PostFX.cpp.

void sfPostFX::SetTexture ( const std::string &  Name,
sfImage Image 
)

Set a texture parameter

Parameters:
Name : Texture name in the effect
Image : Image to set (pass NULL to use content of current framebuffer)

Definition at line 176 of file PostFX.cpp.

void sfPostFX::Render ( sfRenderWindow Window  )  [protected, virtual]

/see sfDrawable::Render

Implements sfDrawable.

Definition at line 186 of file PostFX.cpp.

References sfImage::Bind(), sfImage::GetHeight(), sfWindow::GetHeight(), sfImage::GetTexCoords(), sfImage::GetWidth(), sfWindow::GetWidth(), sfImage::Resize(), sfImage::SetRepeat(), and sfImage::SetSmooth().


The documentation for this class was generated from the following files:
Generated for SFML by  doxygen 1.5.2