PostFX.h File Reference

#include <SFML/Config.h>
#include <SFML/Graphics/Image.h>

Go to the source code of this file.


Typedefs

typedef sfPostFX sfPostFX
 PostFX is used to apply a post effect to a window.

Functions

CSFML_API sfPostFXsfPostFX_CreateFromFile (const char *Filename)
 Create a new post-fx from a file.
CSFML_API sfPostFXsfPostFX_CreateFromMemory (const char *Effect)
 Create a new post-fx from an effect source code.
CSFML_API void sfPostFX_Destroy (sfPostFX *PostFX)
 Destroy an existing post-fx.
CSFML_API void sfPostFX_SetParameter1 (sfPostFX *PostFX, const char *Name, float X)
 Change a parameter of a post-fx (1 float).
CSFML_API void sfPostFX_SetParameter2 (sfPostFX *PostFX, const char *Name, float X, float Y)
 Change a parameter of a post-fx (2 floats).
CSFML_API void sfPostFX_SetParameter3 (sfPostFX *PostFX, const char *Name, float X, float Y, float Z)
 Change a parameter of a post-fx (3 floats).
CSFML_API void sfPostFX_SetParameter4 (sfPostFX *PostFX, const char *Name, float X, float Y, float Z, float W)
 Change a parameter of a post-fx (4 floats).
CSFML_API void sfPostFX_SetTexture (sfPostFX *PostFX, const char *Name, sfImage *Texture)
 Set a texture parameter in a post-fx.
CSFML_API sfBool sfPostFX_CanUsePostFX ()
 Tell whether or not the system supports post-effects.

Typedef Documentation

typedef struct sfPostFX sfPostFX

PostFX is used to apply a post effect to a window.

Definition at line 38 of file PostFX.h.


Function Documentation

CSFML_API sfBool sfPostFX_CanUsePostFX (  ) 

Tell whether or not the system supports post-effects.

Returns:
sfTrue if the system can use post-effects

CSFML_API sfPostFX* sfPostFX_CreateFromFile ( const char *  Filename  ) 

Create a new post-fx from a file.

Parameters:
Filename : File to load
Returns:
A new sfPostFX object, or NULL if it failed

CSFML_API sfPostFX* sfPostFX_CreateFromMemory ( const char *  Effect  ) 

Create a new post-fx from an effect source code.

Parameters:
Effect : Source code of the effect
Returns:
A new sfPostFX object, or NULL if it failed

CSFML_API void sfPostFX_Destroy ( sfPostFX PostFX  ) 

Destroy an existing post-fx.

Parameters:
PostFX : PostFX to delete

CSFML_API void sfPostFX_SetParameter1 ( sfPostFX PostFX,
const char *  Name,
float  X 
)

Change a parameter of a post-fx (1 float).

Parameters:
PostFX : Post-effect to modify
Name : Parameter name in the effect
X : Value to assign

CSFML_API void sfPostFX_SetParameter2 ( sfPostFX PostFX,
const char *  Name,
float  X,
float  Y 
)

Change a parameter of a post-fx (2 floats).

Parameters:
PostFX : Post-effect to modify
Name : Parameter name in the effect
X,Y : Values to assign

CSFML_API void sfPostFX_SetParameter3 ( sfPostFX PostFX,
const char *  Name,
float  X,
float  Y,
float  Z 
)

Change a parameter of a post-fx (3 floats).

Parameters:
PostFX : Post-effect to modify
Name : Parameter name in the effect
X,Y,Z : Values to assign

CSFML_API void sfPostFX_SetParameter4 ( sfPostFX PostFX,
const char *  Name,
float  X,
float  Y,
float  Z,
float  W 
)

Change a parameter of a post-fx (4 floats).

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

CSFML_API void sfPostFX_SetTexture ( sfPostFX PostFX,
const char *  Name,
sfImage Texture 
)

Set a texture parameter in a post-fx.

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