Vigilante Game Framework  1.0.0.8
A 2D/3D C++ Game Framework using SFML.
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | List of all members
VPostEffectBase Class Referenceabstract

Base class for Post Processing Effects. More...

#include <VPostEffect.h>

Inheritance diagram for VPostEffectBase:
VPostEffect VPostEffectMultipass

Public Member Functions

virtual void Apply (const sf::Texture &input, sf::RenderTarget &output)=0
 
virtual void Update (float dt)
 

Static Public Member Functions

static bool isSupported ()
 

Static Protected Member Functions

static void applyShader (const sf::Shader &shader, sf::RenderTarget &output)
 
static void passThrough (const sf::Texture &input, sf::RenderTarget &output)
 

Detailed Description

Base class for Post Processing Effects.

Member Function Documentation

◆ Apply()

virtual void VPostEffectBase::Apply ( const sf::Texture &  input,
sf::RenderTarget &  output 
)
pure virtual

Apply post effect from an input RenderTexture to an output RenderTarget (which may be a RenderTexture or Window). (Must be overwritten)

Parameters
inputThe texture to pass through.
outputThe render target (Whether it's a RenderTexture or RenderWindow) to apply the shader to.

Implemented in VPostEffect, and VPostEffectMultipass.

◆ applyShader()

static void VPostEffectBase::applyShader ( const sf::Shader &  shader,
sf::RenderTarget &  output 
)
staticprotected

Applies a shader to a render target.

Parameters
shaderThe sf::Shader object containing the vertex, geometry anf/or fragment shader to use.
outputThe render target (Whether it's a RenderTexture or RenderWindow) to apply the shader to.

◆ isSupported()

static bool VPostEffectBase::isSupported ( )
static
Returns
True if Shaders are supported on specific platform, shaders won't apply automatically if not.

◆ passThrough()

static void VPostEffectBase::passThrough ( const sf::Texture &  input,
sf::RenderTarget &  output 
)
staticprotected

Simply renders an input texture onto a render target directly without any alterations.

Parameters
inputThe texture to pass through.
outputThe render target (Whether it's a RenderTexture or RenderWindow) to apply the shader to.

◆ Update()

virtual void VPostEffectBase::Update ( float  dt)
inlinevirtual

Updates post effect.

Parameters
dtDelta Time between the previous and current frame.

Reimplemented in VPostEffectMultipass.


The documentation for this class was generated from the following file: