xyginext  0.2.0
Second generation of xygine game creation framework
Public Member Functions | List of all members
xy::PostBlur Class Referencefinal

Post process effect which applies a screen-wide gaussian blur. This effect can be enabled and disabled as needed via direct call to setEnabled(). Blur amount is animated when enabling or disabling for a smoother transition. More...

#include <Blur.hpp>

Inheritance diagram for xy::PostBlur:
xy::PostProcess

Public Member Functions

void apply (const sf::RenderTexture &, sf::RenderTarget &) override
 Applies the effect to the screen.
 
void setEnabled (bool)
 Enables or disables the blur effect. By default this is disabled, so call this at least once if no blur is apparent.
 
void setFadeSpeed (float value)
 Sets the speed of the transition when enabling or disabling the effect. More...
 
- Public Member Functions inherited from xy::PostProcess
 PostProcess (const PostProcess &)=delete
 
 PostProcess (PostProcess &&)=delete
 
PostProcessoperator= (const PostProcess &)=delete
 
PostProcessoperator= (PostProcess &&)=delete
 
virtual void update (float)
 Updates the effect. Some effects may require shader parameters to be updated over time. This optionally overridable function passes in the current frame time and allows updating those parameters. This is called automatically when the effect is added to a Scene, but will need to be called manually when using the effect on its own.
 
void resizeBuffer (sf::Int32 w, sf::Int32 h)
 

Additional Inherited Members

- Public Types inherited from xy::PostProcess
using Ptr = std::unique_ptr< PostProcess >
 
- Protected Member Functions inherited from xy::PostProcess
virtual void bufferResized ()
 Called when the main output buffer resized. Implement this in post processes which contain intermediate buffers which need to be updated.
 
sf::Vector2i getBufferSize () const
 Returns the current buffer size.
 
- Static Protected Member Functions inherited from xy::PostProcess
static void applyShader (const sf::Shader &, sf::RenderTarget &)
 

Detailed Description

Post process effect which applies a screen-wide gaussian blur. This effect can be enabled and disabled as needed via direct call to setEnabled(). Blur amount is animated when enabling or disabling for a smoother transition.

Member Function Documentation

◆ setFadeSpeed()

void xy::PostBlur::setFadeSpeed ( float  value)

Sets the speed of the transition when enabling or disabling the effect.

Parameters
Valuemust be 1 or greater