Image Component Library (ICL)
Public Member Functions | Private Member Functions | Private Attributes | List of all members
icl::qt::GLFragmentShader Class Reference

Simple wrapper class for OpenGL 2.0 Fragment Shader Programs. More...

#include <GLFragmentShader.h>

Inheritance diagram for icl::qt::GLFragmentShader:
icl::utils::Uncopyable

Public Member Functions

 GLFragmentShader (const std::string &vertexProgram, const std::string &fragmentProgram, bool createOnFirstActivate=true)
 
 ~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 More...
 
GLFragmentShadercopy () const
 creates a deep copy of this shader More...
 

Private Member Functions

void create ()
 

Private Attributes

Data * m_data
 

Additional Inherited Members

- Protected Member Functions inherited from icl::utils::Uncopyable
 Uncopyable ()
 Empty base constructor. More...
 

Detailed Description

Simple wrapper class for OpenGL 2.0 Fragment Shader Programs.

The GLFragmentShader class can be used to create simple fragment shader programs.

Constructor & Destructor Documentation

◆ GLFragmentShader()

icl::qt::GLFragmentShader::GLFragmentShader ( const std::string &  vertexProgram,
const std::string &  fragmentProgram,
bool  createOnFirstActivate = true 
)

◆ ~GLFragmentShader()

icl::qt::GLFragmentShader::~GLFragmentShader ( )

Member Function Documentation

◆ activate()

void icl::qt::GLFragmentShader::activate ( )

◆ copy()

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

◆ create()

void icl::qt::GLFragmentShader::create ( )
private

◆ deactivate()

void icl::qt::GLFragmentShader::deactivate ( )

deactivates the shader

This function does not do anything, if the shader was not enabled before!

◆ setUniform() [1/5]

void icl::qt::GLFragmentShader::setUniform ( const std::string  var,
const float &  val 
)

◆ setUniform() [2/5]

void icl::qt::GLFragmentShader::setUniform ( const std::string  var,
const int &  val 
)

◆ setUniform() [3/5]

void icl::qt::GLFragmentShader::setUniform ( const std::string  var,
const math::FixedMatrix< float, 4, 4 > &  val 
)

◆ setUniform() [4/5]

void icl::qt::GLFragmentShader::setUniform ( const std::string  var,
const std::vector< math::FixedMatrix< float, 4, 4 > > &  val 
)

◆ setUniform() [5/5]

void icl::qt::GLFragmentShader::setUniform ( const std::string  var,
const math::FixedColVector< float, 4 > &  val 
)

Member Data Documentation

◆ m_data

Data* icl::qt::GLFragmentShader::m_data
private

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