Flow Visualisation
render::Shader Class Reference

OpenGL shader class. More...

#include <Shader.h>

Inheritance diagram for render::Shader:
Collaboration diagram for render::Shader:

Public Member Functions

 Shader ()
 
virtual ~Shader (void)
 
bool init (const char *vertexShaderFilename, const char *pixelShaderFilename)
 Reads Shader from tex files. More...
 
void uninit (void)
 Cleans up shader. More...
 
void bindAttributeLocations ()
 Binds correct attribute locations. More...
 
void use (void)
 Sets this shader active. More...
 
Uniform getUniform (const char *uniformName)
 Gets uniform by name. More...
 
virtual void render (SceneContext *context)
 Sets shader active and saves it in. More...
 
- Public Member Functions inherited from render::ISceneGraphPart
 ISceneGraphPart ()
 child elements in the scene graph More...
 
void addChild (ISceneGraphPart *child)
 adds child to this element in the scenegraph More...
 
void removeChild (ISceneGraphPart *child)
 removes child from the scenegraph More...
 
virtual ~ISceneGraphPart ()
 

Additional Inherited Members

- Protected Attributes inherited from render::ISceneGraphPart
ISceneGraphPartm_parent
 
std::vector< ISceneGraphPart * > m_children
 parent element in the scene graph More...
 

Detailed Description

OpenGL shader class.

Constructor & Destructor Documentation

render::Shader::Shader ( )
inline
Shader::~Shader ( void  )
virtual

Member Function Documentation

void Shader::bindAttributeLocations ( )

Binds correct attribute locations.

Uniform render::Shader::getUniform ( const char *  uniformName)
inline

Gets uniform by name.

Parameters
uniformNameName of the uniform
bool Shader::init ( const char *  vertexShaderFilename,
const char *  pixelShaderFilename 
)

Reads Shader from tex files.

Parameters
vertexShaderFilenameThe Vertex Shader
pixelShaderFilenameThe Fragment Shader
void Shader::render ( SceneContext context)
virtual

Sets shader active and saves it in.

See also
render::SceneContext
Parameters
contextobject to save current state of rendering Overwritten from
See also
render::ISceneGraphPart Saves current active Shader, Sets itself as active shader and renders all child elements. Afterswards restores the previous Shader

Implements render::ISceneGraphPart.

void Shader::uninit ( void  )

Cleans up shader.

void Shader::use ( void  )

Sets this shader active.


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