Common class implementing basic uniform operations. More...
#include </home/chochlik/devel/oglplus/include/oglplus/uniform.hpp>
Public Member Functions | |
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... | |
Common class implementing basic uniform operations.
Program::ActiveVariableInfo oglplus::UniformOps< Initializer, Typechecker >::Info | ( | void | ) |
Returns a Program::ActiveVariableInfo for this uniform.
Note that this is a rather inefficient operation.
bool oglplus::UniformOps< Initializer, Typechecker >::IsActive | ( | void | ) |
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.