Base template for Uniform and ProgramUniform. More...
#include </home/chochlik/devel/oglplus/include/oglplus/uniform.hpp>
Public Member Functions | |
void | Set (T value) |
Set the value of the uniform variable. More... | |
void | Set (GLsizei count, const T *v) |
Set the multiple value(s) of the uniform variable. More... | |
void | Set (const std::vector< T > &v) |
Set the value(s) of the uniform variable. More... | |
template<typename... P> | |
void | Set (T v, P...p) |
Set the multiple value(s) of the uniform variable. More... | |
template<typename... P> | |
void | SetVector (T v, P...p) |
Set the vector value of the uniform variable. More... | |
template<std::size_t Cols> | |
void | SetVector (const T *v) |
Set the vector value of the uniform variable. More... | |
template<std::size_t Cols> | |
void | SetVectors (GLsizei count, const T *v) |
Set multiple scalar or vector values of an uniform variable. More... | |
template<std::size_t Cols> | |
void | SetVectors (const std::vector< T > &v) |
Set multiple scalar or vector values of an uniform variable. More... | |
template<std::size_t Cols, std::size_t Rows> | |
void | SetMatrix (std::size_t count, const T *v) |
Set the matrix components of the uniform variable. More... | |
template<std::size_t Cols, typename... P> | |
void | SetMatrix (T v, P...p) |
Set the matrix components of the uniform variable. More... | |
bool | IsActive (void) |
Tests if this Uniform is initialized and can be used. More... | |
GLint | Location (void) const |
Returns the location of this uniform in a program. | |
Program::ActiveVariableInfo | Info (void) |
Returns a Program::ActiveVariableInfo for this uniform. More... | |
Base template for Uniform and ProgramUniform.
|
inherited |
Returns a Program::ActiveVariableInfo for this uniform.
Note that this is a rather inefficient operation.
|
inherited |
Tests if this Uniform is initialized and can be used.
For Uniform and ProgramUniform this function always returns true as these cannot be in uninitialized state. For LazyUniform, LazyProgramUniform, OptionalUniform, etc. this function returns true if the uniform is active and can be used for subsequent value-setting operations. If this function returns false then trying to set a value or any other operation on the uniform besides destruction throws an exception.
Referenced by oglplus::UniformTpl< aux::AdjustUniformType< oglplus::Vector< GLint, 2 > >::Type, oglplus::Vector< GLint, 2 >, Unspecified, Unspecified, Unspecified< aux::AdjustUniformType< oglplus::Vector< GLint, 2 > >::Type > >::operator bool(), and oglplus::UniformTpl< aux::AdjustUniformType< oglplus::Vector< GLint, 2 > >::Type, oglplus::Vector< GLint, 2 >, Unspecified, Unspecified, Unspecified< aux::AdjustUniformType< oglplus::Vector< GLint, 2 > >::Type > >::operator!().
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::Set | ( | T | value) |
Set the value of the uniform variable.
Referenced by oglplus::UniformSpecOps< Vector< T, N >, LocationInit, Typechecker, SpecOpsWrapper >::Set(), and oglplus::UniformSpecOps< Matrix< T, Rows, Cols >, LocationInit, Typechecker, SpecOpsWrapper >::Set().
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::Set | ( | GLsizei | count, |
const T * | v | ||
) |
Set the multiple value(s) of the uniform variable.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::Set | ( | const std::vector< T > & | v) |
Set the value(s) of the uniform variable.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::Set | ( | T | v, |
P... | p | ||
) |
Set the multiple value(s) of the uniform variable.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetMatrix | ( | std::size_t | count, |
const T * | v | ||
) |
Set the matrix components of the uniform variable.
Uniform<Matrix<T,M,N>>
insteadvoid oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetMatrix | ( | T | v, |
P... | p | ||
) |
Set the matrix components of the uniform variable.
Uniform<Matrix<T,M,N>>
insteadvoid oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetVector | ( | T | v, |
P... | p | ||
) |
Set the vector value of the uniform variable.
This function can be used to set uniform variables with 2, 3 or 4 -component vector types with the same underlying type as is the template parameter of the Uniform or ProgramUniform class. For example Uniform<GLfloat>::SetVector() can be used to set the values of GLSL uniforms with vec2, vec3 or vec4 type, Uniform<GLint>::SetVector() can be used to set the values of GLSL uniforms with ivec2, ivec3 or ivec4 type, etc.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetVector | ( | const T * | v) |
Set the vector value of the uniform variable.
This function can be used to set uniform variables with 2, 3 or 4 -component vector types with the same underlying type as is the template parameter of the Uniform or ProgramUniform class.
For example Uniform<GLfloat>::SetVector() can be used to set the values of GLSL uniforms with vec2, vec3 or vec4 type, Uniform<GLint>::SetVector() can be used to set the values of GLSL uniforms with ivec2, ivec3 or ivec4 type, etc.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetVectors | ( | GLsizei | count, |
const T * | v | ||
) |
Set multiple scalar or vector values of an uniform variable.
This function can be used to set multiple values of an uniform array variable with scalar or vector type with 2, 3 or 4 -components with the same underlying type as is the template parameter of the Uniform or ProgramUniform class.
For example Uniform<GLfloat>::SetVector() can be used to set the values of GLSL uniforms with vec2, vec3 or vec4 type, Uniform<GLint>::SetVector() can be used to set the values of GLSL uniforms with ivec2, ivec3 or ivec4 type, etc.
void oglplus::UniformSpecOps< T, LocationInit, Typechecker, SpecOpsWrapper >::SetVectors | ( | const std::vector< T > & | v) |
Set multiple scalar or vector values of an uniform variable.
This function can be used to set multiple values of an uniform array variable with scalar or vector type with 2, 3 or 4 -components with the same underlying type as is the template parameter of the Uniform or ProgramUniform class.
For example Uniform<GLfloat>::SetVector() can be used to set the values of GLSL uniforms with vec2, vec3 or vec4 type, Uniform<GLint>::SetVector() can be used to set the values of GLSL uniforms with ivec2, ivec3 or ivec4 type, etc.