![]() |
globjects
1.0.0.000000000000
Strict OpenGL objects wrapper.
|
Wraps access to typed global GLSL variables. More...
#include <globjects/include/globjects/AbstractUniform.h>
Public Member Functions | |
Uniform (gl::GLint location) | |
Uniform (gl::GLint location, const T &value) | |
Uniform (const std::string &name) | |
Uniform (const std::string &name, const T &value) | |
void | set (const T &value) |
const T & | value () const |
Protected Member Functions | |
virtual | ~Uniform () |
virtual void | updateAt (const Program *program, gl::GLint location) const override |
Protected Attributes | |
T | m_value |
The uniforms value, explictly required when relinking programs. More... | |
Wraps access to typed global GLSL variables.
The Uniform class wraps access to typed global GLSL variables (uniforms). These are stored in the OpenGL program objects itself.
Supported OpenGL uniform setters are wrapped via specialized template set implementations. Note that unsupported uniform types result in compile time errors due to the default implementation of set.
Simple usage of an Uniform:
globjects::Uniform< T >::Uniform | ( | gl::GLint | location | ) |
globjects::Uniform< T >::Uniform | ( | gl::GLint | location, |
const T & | value | ||
) |
globjects::Uniform< T >::Uniform | ( | const std::string & | name | ) |
globjects::Uniform< T >::Uniform | ( | const std::string & | name, |
const T & | value | ||
) |
|
protectedvirtual |
void globjects::Uniform< T >::set | ( | const T & | value | ) |
const T& globjects::Uniform< T >::value | ( | ) | const |
|
overrideprotectedvirtual |
|
protected |
The uniforms value, explictly required when relinking programs.