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

The Painter class Includes the rendering process, thus creating the whole picture. The Painter will be used by QML within rendering thread. More...

#include <painter.h>

Inheritance diagram for Painter:

Public Slots

void paint ()
 Starts rendering and paints the whole picture. More...
 

Signals

void initializeDone ()
 This signal is emitted if initialization of all required resources for current scene are initialized. The signal is emitted every time if previous scene was deleted and a new scene was synchronized. More...
 

Public Member Functions

 Painter (PainterQML *painter, QObject *parent=0)
 Constructor of Painter. More...
 
virtual ~Painter ()
 Destructor. Will delete all rendering related classes and resources. More...
 
void updateEnvMap ()
 Updates environment map using config file. More...
 
bool isActive () const
 Checks if Painter is active. Active means the painter is rendering. More...
 
void setActive (bool active)
 Sets Active state. If active is true the painter renders the picture. More...
 
void clearScene ()
 Clears the scene and removes all not anymore required resources. More...
 
void synchronizeScene (Scene *scene)
 Painter copies all needed information of scene into own thread. More...
 

Protected Slots

void handleInitializeDone ()
 

Protected Member Functions

void initialize ()
 Initializes all required resources, that are direct members of painter (scene independent resources). This method is executed within first paint. More...
 
void initializeFBOs ()
 
void initializeShaderPrograms ()
 
void renderLightRays (const Camera &camera)
 
void renderScene (const Camera &camera)
 

Protected Attributes

bool m_active
 
EnvironmentMapm_envMap
 
QOpenGLFunctions * m_gl
 
bool m_initialized
 
BlurEffectm_blurEffectScene
 
int m_blurViewportRatioScene
 
uint m_glowSceneFBO
 
uint m_glowSceneDepthRB
 
uint m_glowSceneTexture
 
BlurEffectm_blurEffectPreviewScene
 
int m_blurViewportRatioPreviewScene
 
uint m_glowPreviewSceneFBO
 
uint m_glowPreviewSceneDepthRB
 
uint m_glowPreviewSceneTexture
 
uint m_previewSceneFBO
 
uint m_previewSceneDepthRB
 
uint m_previewSceneTexture
 
PainterQMLm_painterQML
 
ScreenAlignedQuadm_quad
 
CubeMapm_rainbowMap
 
CubeMapm_gemStructureMap
 
uint m_sceneFBO
 
uint m_sceneDepthRB
 
uint m_sceneTexture
 
QHash< ShaderPrograms,
QOpenGLShaderProgram * > * 
m_shaderPrograms
 
QSize * m_usedViewport
 
int m_counter
 
int m_oldElapsed
 
QTime * m_time
 
SceneRendererm_sceneRenderer
 
Cameram_camera
 
Cameram_previewCamera
 

Detailed Description

The Painter class Includes the rendering process, thus creating the whole picture. The Painter will be used by QML within rendering thread.

Constructor & Destructor Documentation

Painter::Painter ( PainterQML painter,
QObject *  parent = 0 
)
explicit

Constructor of Painter.

Parameters
painterCorresponding QML-Painter. Will be informed about finished rendering.
parentQObject-parent
Painter::~Painter ( )
virtual

Destructor. Will delete all rendering related classes and resources.

Member Function Documentation

void Painter::clearScene ( )

Clears the scene and removes all not anymore required resources.

void Painter::handleInitializeDone ( )
protectedslot
void Painter::initialize ( )
protected

Initializes all required resources, that are direct members of painter (scene independent resources). This method is executed within first paint.

void Painter::initializeDone ( )
signal

This signal is emitted if initialization of all required resources for current scene are initialized. The signal is emitted every time if previous scene was deleted and a new scene was synchronized.

void Painter::initializeFBOs ( )
protected
void Painter::initializeShaderPrograms ( )
protected
bool Painter::isActive ( ) const

Checks if Painter is active. Active means the painter is rendering.

Returns
Active state of painter.
void Painter::paint ( )
slot

Starts rendering and paints the whole picture.

void Painter::renderLightRays ( const Camera camera)
protected
void Painter::renderScene ( const Camera camera)
protected
void Painter::setActive ( bool  active)

Sets Active state. If active is true the painter renders the picture.

Parameters
active
void Painter::synchronizeScene ( Scene scene)

Painter copies all needed information of scene into own thread.

Parameters
sceneThe scene that should be synchronized. If nullptr is passed it is like clearScene()
void Painter::updateEnvMap ( )

Updates environment map using config file.

Member Data Documentation

bool Painter::m_active
protected
BlurEffect* Painter::m_blurEffectPreviewScene
protected
BlurEffect* Painter::m_blurEffectScene
protected
int Painter::m_blurViewportRatioPreviewScene
protected
int Painter::m_blurViewportRatioScene
protected
Camera* Painter::m_camera
protected
int Painter::m_counter
protected
EnvironmentMap* Painter::m_envMap
protected
CubeMap* Painter::m_gemStructureMap
protected
QOpenGLFunctions* Painter::m_gl
protected
uint Painter::m_glowPreviewSceneDepthRB
protected
uint Painter::m_glowPreviewSceneFBO
protected
uint Painter::m_glowPreviewSceneTexture
protected
uint Painter::m_glowSceneDepthRB
protected
uint Painter::m_glowSceneFBO
protected
uint Painter::m_glowSceneTexture
protected
bool Painter::m_initialized
protected
int Painter::m_oldElapsed
protected
PainterQML* Painter::m_painterQML
protected
Camera* Painter::m_previewCamera
protected
uint Painter::m_previewSceneDepthRB
protected
uint Painter::m_previewSceneFBO
protected
uint Painter::m_previewSceneTexture
protected
ScreenAlignedQuad* Painter::m_quad
protected
CubeMap* Painter::m_rainbowMap
protected
uint Painter::m_sceneDepthRB
protected
uint Painter::m_sceneFBO
protected
SceneRenderer* Painter::m_sceneRenderer
protected
uint Painter::m_sceneTexture
protected
QHash<ShaderPrograms, QOpenGLShaderProgram*>* Painter::m_shaderPrograms
protected
QTime* Painter::m_time
protected
QSize* Painter::m_usedViewport
protected

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