Image Component Library (ICL)
|
Simple wrapper class for OpenGL 2.0 Fragment Shader Programs. More...
#include <GLFragmentShader.h>
Public Member Functions | |
GLFragmentShader (const std::string &vertexProgram, const std::string &fragmentProgram, bool createOnFirstActivate=true) throw (utils::ICLException) | |
~GLFragmentShader () | |
void | setUniform (const std::string var, const float &val) |
void | setUniform (const std::string var, const int &val) |
void | setUniform (const std::string var, const math::FixedMatrix< float, 4, 4 > &val) |
void | setUniform (const std::string var, const std::vector< math::FixedMatrix< float, 4, 4 > > &val) |
void | setUniform (const std::string var, const math::FixedColVector< float, 4 > &val) |
void | activate () |
void | deactivate () |
deactivates the shader | |
GLFragmentShader * | copy () const |
creates a deep copy of this shader | |
Private Member Functions | |
void | create () |
Private Attributes | |
Data * | m_data |
Simple wrapper class for OpenGL 2.0 Fragment Shader Programs.
The GLFragmentShader class can be used to create simple fragment shader programs.
icl::qt::GLFragmentShader::GLFragmentShader | ( | const std::string & | vertexProgram, |
const std::string & | fragmentProgram, | ||
bool | createOnFirstActivate = true |
||
) | throw (utils::ICLException) |
void icl::qt::GLFragmentShader::activate | ( | ) |
GLFragmentShader* icl::qt::GLFragmentShader::copy | ( | ) | const |
creates a deep copy of this shader
The resulting copy does only use this instance's program string and is other than this independent. The copy is created in createOnFirstActivate mode
void icl::qt::GLFragmentShader::create | ( | ) | [private] |
deactivates the shader
This function does not do anything, if the shader was not enabled before!
void icl::qt::GLFragmentShader::setUniform | ( | const std::string | var, |
const float & | val | ||
) |
void icl::qt::GLFragmentShader::setUniform | ( | const std::string | var, |
const int & | val | ||
) |
void icl::qt::GLFragmentShader::setUniform | ( | const std::string | var, |
const math::FixedMatrix< float, 4, 4 > & | val | ||
) |
void icl::qt::GLFragmentShader::setUniform | ( | const std::string | var, |
const std::vector< math::FixedMatrix< float, 4, 4 > > & | val | ||
) |
void icl::qt::GLFragmentShader::setUniform | ( | const std::string | var, |
const math::FixedColVector< float, 4 > & | val | ||
) |
Data* icl::qt::GLFragmentShader::m_data [private] |