dsfml.graphics.postfx



class PostFX;
PostFX is used to apply a post effect to a window

See Also:
SFML post FX tutorial from more informations about Post effects and GLSL fragment shaders syntax.

this();
Default constructor

bool loadFromFile(char[] filename);
Load the effect from a file

Params:
char[] filename Path of the effect file to load

Returns:
True on success

bool loadFromMemory(char[] effect);
Load the effect from a text in memory

Params:
char[] effect String containing the effect code

Returns:
True on success

void setParameter(char[] name, float x);
void setParameter(char[] name, float x, float y);
void setParameter(char[] name, float x, float y, float z);
void setParameter(char[] name, float x, float y, float z, float w);
Change parameters of the effect

Params:
char[] name Parameter name in the effect

void setTexture(char[] name, Image texture);
Set a texture parameter

Params:
char[] name Texture name in the effect
Image texture Image to set (pass NULL to use content of current framebuffer)

static bool canUsePostFX();
Tell whether or not the system supports post-effects

Returns:
True if the system can use post-effects


Page generated by Ddoc.