ork::Uniform1< U, T, R, V, W > Class Template Reference
[render]

A uniform holding a single number. More...

#include <Uniform.h>

Inheritance diagram for ork::Uniform1< U, T, R, V, W >:
ork::Uniform ork::Object

List of all members.

Public Member Functions

virtual ~Uniform1 ()
 Deletes this uniform.
virtual UniformType getType () const
 Returns the type of this uniform.
get () const
 Returns the current value of this uniform.
void set (T value)
 Sets the value of this uniform.
virtual void setValue (ptr< Value > v)
 Sets the value of this uniform.

Protected Member Functions

 Uniform1 (Program *program, UniformBlock *block, const string &name, GLint location)
 Creates a new uniform.
virtual void setValue ()
 Sets this uniform in its program.

Detailed Description

template<UniformType U, class T, class R, const char * V, const char * W>
class ork::Uniform1< U, T, R, V, W >

A uniform holding a single number.


Constructor & Destructor Documentation

template<UniformType U, class T , class R , const char * V, const char * W>
virtual ork::Uniform1< U, T, R, V, W >::~Uniform1 (  )  [inline, virtual]

Deletes this uniform.

template<UniformType U, class T , class R , const char * V, const char * W>
ork::Uniform1< U, T, R, V, W >::Uniform1 ( Program program,
UniformBlock block,
const string &  name,
GLint  location 
) [inline, protected]

Creates a new uniform.

Parameters:
program the Program to which this uniform belongs.
block UniformBlock to which this uniform belongs. Maybe NULL.
name the name of the uniform in the GLSL shader code.
location the location of this uniform. For an uniform inside a block, this location is an offset inside the uniform block buffer.

Member Function Documentation

template<UniformType U, class T , class R , const char * V, const char * W>
T ork::Uniform1< U, T, R, V, W >::get (  )  const [inline]

Returns the current value of this uniform.

template<UniformType U, class T , class R , const char * V, const char * W>
virtual UniformType ork::Uniform1< U, T, R, V, W >::getType (  )  const [inline, virtual]

Returns the type of this uniform.

Implements ork::Uniform.

template<UniformType U, class T , class R , const char * V, const char * W>
void ork::Uniform1< U, T, R, V, W >::set ( value  )  [inline]

Sets the value of this uniform.

Parameters:
value the new value for this uniform.
template<UniformType U, class T , class R , const char * V, const char * W>
virtual void ork::Uniform1< U, T, R, V, W >::setValue (  )  [protected, virtual]

Sets this uniform in its program.

Implements ork::Uniform.

template<UniformType U, class T , class R , const char * V, const char * W>
virtual void ork::Uniform1< U, T, R, V, W >::setValue ( ptr< Value v  )  [inline, virtual]

Sets the value of this uniform.

Parameters:
v the new value for this uniform. Must be of the same type as this Uniform.

Implements ork::Uniform.


Generated on Mon Oct 18 09:36:10 2010 for ork by  doxygen 1.6.1