Gem Illuminator
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
BlurEffect Class Reference

The BlurEffect blurs a given texture. More...

#include <blureffect.h>

Inheritance diagram for BlurEffect:

Public Member Functions

 BlurEffect (QOpenGLFunctions &gl, uint glowTexture, QObject *parent=nullptr)
 Creates a new BlurEffect that will blur a specified texture everytime blur() is called. More...
 
virtual ~BlurEffect ()
 
void blur (const QSize &textureSize)
 Blurs previous set texture. The texture is blurred using two seperated passes of gauss blur. The result is a gaussblur with 9x9 kernel. More...
 

Protected Member Functions

void initialize ()
 
void initializeFBOs ()
 
void initializeShaderPrograms ()
 
void renderGaussHorizontal (const QSize &textureSize)
 Blurs texture horizontally. More...
 
void renderGaussVertical (const QSize &textureSize)
 Blurs texture vertically. More...
 

Protected Attributes

QOpenGLFunctions & m_gl
 
QMap< ShaderPrograms,
QOpenGLShaderProgram * > * 
m_shaderPrograms
 
bool m_initialized
 
uint m_blurFBO
 
uint m_blurTexture
 
uint m_secondaryBlurFBO
 
uint m_secondaryBlurTexture
 
QSize * m_usedViewport
 
ScreenAlignedQuadm_quad
 

Detailed Description

The BlurEffect blurs a given texture.

Constructor & Destructor Documentation

BlurEffect::BlurEffect ( QOpenGLFunctions &  gl,
uint  glowTexture,
QObject *  parent = nullptr 
)

Creates a new BlurEffect that will blur a specified texture everytime blur() is called.

Parameters
glThe QOpenGLFuntions will be used for all gl-calls.
glowTextureThe texture that will be blurred.
parentQObject-parent
BlurEffect::~BlurEffect ( )
virtual

Member Function Documentation

void BlurEffect::blur ( const QSize &  textureSize)

Blurs previous set texture. The texture is blurred using two seperated passes of gauss blur. The result is a gaussblur with 9x9 kernel.

Parameters
textureSizeThe size of texture, because changing texture sizes is supported.
void BlurEffect::initialize ( )
protected
void BlurEffect::initializeFBOs ( )
protected
void BlurEffect::initializeShaderPrograms ( )
protected
void BlurEffect::renderGaussHorizontal ( const QSize &  textureSize)
protected

Blurs texture horizontally.

Parameters
textureSizeThe current size of texture that is blurred.
void BlurEffect::renderGaussVertical ( const QSize &  textureSize)
protected

Blurs texture vertically.

Parameters
textureSizeThe current size of texture that is blurred.

Member Data Documentation

uint BlurEffect::m_blurFBO
protected
uint BlurEffect::m_blurTexture
protected
QOpenGLFunctions& BlurEffect::m_gl
protected
bool BlurEffect::m_initialized
protected
ScreenAlignedQuad* BlurEffect::m_quad
protected
uint BlurEffect::m_secondaryBlurFBO
protected
uint BlurEffect::m_secondaryBlurTexture
protected
QMap<ShaderPrograms, QOpenGLShaderProgram*>* BlurEffect::m_shaderPrograms
protected
QSize* BlurEffect::m_usedViewport
protected

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