Template for Uniform, ProgramUniform, LazyUniform, LazyProgramUniform, etc. More...
#include </home/chochlik/devel/oglplus/include/oglplus/uniform.hpp>
Public Member Functions | |
UniformTpl (const ProgramOps &program, const GLchar *identifier) | |
Reference a uniform identified by identifier in the program . More... | |
UniformTpl (const ProgramOps &program, const String &identifier) | |
Reference a uniform identified by identifier in the program . More... | |
UniformTpl (const ProgramOps &program, String &&identifier) | |
Reference a uniform identified by identifier in the program . More... | |
UniformTpl (const ProgramOps &program, GLint location) | |
Reference a uniform identified by location in the program . More... | |
void | operator= (const T &value) |
Set the value of the uniform variable. More... | |
operator bool (void) | |
Equivalent to IsActive() More... | |
bool | operator! (void) |
Equivalent to !IsActive() More... | |
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... | |
void | Set (T v, P...p) |
Set the multiple value(s) of the uniform variable. More... | |
void | SetVector (T v, P...p) |
Set the vector value of the uniform variable. More... | |
void | SetVector (const T *v) |
Set the vector value of the uniform variable. More... | |
void | SetVectors (GLsizei count, const T *v) |
Set multiple scalar or vector values of an uniform variable. More... | |
void | SetVectors (const std::vector< T > &v) |
Set multiple scalar or vector values of an uniform variable. More... | |
void | SetMatrix (std::size_t count, const T *v) |
Set the matrix components of the uniform variable. More... | |
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... | |
Template for Uniform, ProgramUniform, LazyUniform, LazyProgramUniform, etc.
oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::UniformTpl | ( | const ProgramOps & | program, |
const GLchar * | identifier | ||
) |
Reference a uniform identified by identifier
in the program
.
oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::UniformTpl | ( | const ProgramOps & | program, |
const String & | identifier | ||
) |
Reference a uniform identified by identifier
in the program
.
oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::UniformTpl | ( | const ProgramOps & | program, |
String && | identifier | ||
) |
Reference a uniform identified by identifier
in the program
.
oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::UniformTpl | ( | const ProgramOps & | program, |
GLint | location | ||
) |
Reference a uniform identified by location
in the program
.
|
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!().
oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::operator bool | ( | void | ) |
Equivalent to IsActive()
bool oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::operator! | ( | void | ) |
Equivalent to !IsActive()
void oglplus::UniformTpl< T, S, LocationInit, Typechecker, SetOps >::operator= | ( | const T & | value) |
Set the value of the uniform variable.
|
inherited |
Set the value of the uniform variable.
|
inherited |
Set the multiple value(s) of the uniform variable.
|
inherited |
Set the value(s) of the uniform variable.
|
inherited |
Set the multiple value(s) of the uniform variable.
|
inherited |
Set the matrix components of the uniform variable.
Uniform<Matrix<T,M,N>>
instead
|
inherited |
Set the matrix components of the uniform variable.
Uniform<Matrix<T,M,N>>
instead
|
inherited |
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.
|
inherited |
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.
|
inherited |
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.
|
inherited |
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.