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

The EnvironmentMap is a CubeMap based rendering technique for showing some scene enviroment. More...

#include <environmentmap.h>

Inheritance diagram for EnvironmentMap:

Public Member Functions

 EnvironmentMap (QOpenGLFunctions &gl, QString cubeMapPrefix, QObject *parent=0)
 Creates a new EnvironmentMap. The specified cube map textures are loaded immediately. More...
 
 ~EnvironmentMap ()
 
void paint (const Camera &camera)
 Paints environmentmap into the scene using a ScreenAlignedQuad. More...
 
void update (QString newCubeMapPrefix)
 Replace current CubeMap with new one specified by name. More...
 
uint cubeMapTexture ()
 OpenGL texture that is used for drawing. More...
 

Protected Member Functions

void initialize ()
 
void initializeShaderProgram ()
 

Protected Attributes

CubeMapm_cubeMap
 
bool m_initialized
 
QOpenGLFunctions & m_gl
 
ScreenAlignedQuadm_quad
 
QOpenGLShaderProgram * m_shaderProgram
 

Detailed Description

The EnvironmentMap is a CubeMap based rendering technique for showing some scene enviroment.

Constructor & Destructor Documentation

EnvironmentMap::EnvironmentMap ( QOpenGLFunctions &  gl,
QString  cubeMapPrefix,
QObject *  parent = 0 
)

Creates a new EnvironmentMap. The specified cube map textures are loaded immediately.

Parameters
glThe QOpenGLFunctions which are used for every gl-call
cubeMapPrefixThe name of cubemap that should be shown.
parentQObject-parent
EnvironmentMap::~EnvironmentMap ( )

Member Function Documentation

uint EnvironmentMap::cubeMapTexture ( )

OpenGL texture that is used for drawing.

Returns
void EnvironmentMap::initialize ( )
protected
void EnvironmentMap::initializeShaderProgram ( )
protected
void EnvironmentMap::paint ( const Camera camera)

Paints environmentmap into the scene using a ScreenAlignedQuad.

Parameters
cameraThe camera which is used to render the scene
void EnvironmentMap::update ( QString  newCubeMapPrefix)

Replace current CubeMap with new one specified by name.

Parameters
newCubeMapPrefixThe name of the CubeMap
See also
CubeMap::update()

Member Data Documentation

CubeMap* EnvironmentMap::m_cubeMap
protected
QOpenGLFunctions& EnvironmentMap::m_gl
protected
bool EnvironmentMap::m_initialized
protected
ScreenAlignedQuad* EnvironmentMap::m_quad
protected
QOpenGLShaderProgram* EnvironmentMap::m_shaderProgram
protected

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