# Visualization Library

A lightweight C++ OpenGL middleware for 2D/3D graphics

[Home] [Tutorials] [All Classes] [Grouped Classes]

# vl::Uniform Class Reference

Wraps an OpenGL Shading Language uniform to be associated to a GLSLProgram. More...

`#include <Uniform.hpp>`

Inheritance diagram for vl::Uniform:

List of all members.

## Public Types

enum | EUniformType { NONE = 0x0, UT_Float, UT_Float2, UT_Float3, UT_Float4, UT_Int, UT_Int2, UT_Int3, UT_Int4, UT_UInt, UT_UInt2, UT_UInt3, UT_UInt4, UT_Mat2, UT_Mat3, UT_Mat4, UT_Mat2x3, UT_Mat3x2, UT_Mat2x4, UT_Mat4x2, UT_Mat3x4, UT_Mat4x3 }

## Public Member Functions

virtual const char * | className ()
| Returns the name of the class.
| Uniform ()
| Uniform (const std::string &name)
void | setUniform1i (int count, const int *value)
void | setUniform2i (int count, const int *value)
void | setUniform3i (int count, const int *value)
void | setUniform4i (int count, const int *value)
void | setUniform1ui (int count, const unsigned int *value)
void | setUniform2ui (int count, const unsigned int *value)
void | setUniform3ui (int count, const unsigned int *value)
void | setUniform4ui (int count, const unsigned int *value)
void | setUniform1f (int count, const float *value)
void | setUniform2f (int count, const float *value)
void | setUniform3f (int count, const float *value)
void | setUniform4f (int count, const float *value)
void | setUniformMatrix2f (int count, const float *value)
void | setUniformMatrix3f (int count, const float *value)
void | setUniformMatrix4f (int count, const float *value)
void | setUniformMatrix2x3f (int count, const float *value)
void | setUniformMatrix3x2f (int count, const float *value)
void | setUniformMatrix2x4f (int count, const float *value)
void | setUniformMatrix4x2f (int count, const float *value)
void | setUniformMatrix3x4f (int count, const float *value)
void | setUniformMatrix4x3f (int count, const float *value)
void | setUniform (int count, const ivec2 *value)
void | setUniform (int count, const ivec3 *value)
void | setUniform (int count, const ivec4 *value)
void | setUniform (int count, const uvec2 *value)
void | setUniform (int count, const uvec3 *value)
void | setUniform (int count, const uvec4 *value)
void | setUniform (int count, const fvec2 *value)
void | setUniform (int count, const fvec3 *value)
void | setUniform (int count, const fvec4 *value)
void | setUniform (int count, const fmat2 *value)
void | setUniform (int count, const fmat3 *value)
void | setUniform (int count, const fmat4 *value)
void | setUniform (const int &value)
void | setUniform (const ivec2 &value)
void | setUniform (const ivec3 &value)
void | setUniform (const ivec4 &value)
void | setUniform (const unsigned int &value)
void | setUniform (const uvec2 &value)
void | setUniform (const uvec3 &value)
void | setUniform (const uvec4 &value)
void | setUniform (const float &value)
void | setUniform (const fvec2 &value)
void | setUniform (const fvec3 &value)
void | setUniform (const fvec4 &value)
void | setUniform (const fmat2 &value)
void | setUniform (const fmat3 &value)
void | setUniform (const fmat4 &value)
void | getUniform (float *value)
void | getUniform (int *value)
void | getUniform (unsigned int *value)
void | getUniform (ivec2 *value)
void | getUniform (ivec3 *value)
void | getUniform (ivec4 *value)
void | getUniform (uvec2 *value)
void | getUniform (uvec3 *value)
void | getUniform (uvec4 *value)
void | getUniform (fvec2 *value)
void | getUniform (fvec3 *value)
void | getUniform (fvec4 *value)
void | getUniform (fmat2 *value)
void | getUniform (fmat3 *value)
void | getUniform (fmat4 *value)
EUniformType | type () const
int | count () const

## Protected Member Functions

void | initFloat (int count)
void | initInt (int count)
void | initUInt (int count)

## Protected Attributes

std::vector< float > | mFloatData
std::vector< int > | mIntData
std::vector< unsigned int > | mUIntData
EUniformType | mType

## Friends

class | GLSLProgram

## Detailed Description

Wraps an OpenGL Shading Language uniform to be associated to a GLSLProgram.

See also:
  - GLSLProgram
  - Shader
  - Actor
  - UniformSet

## Member Enumeration Documentation

enum vl::Uniform::EUniformType

Enumerator:

  NONE |
  UT_Float |
  UT_Float2 |
  UT_Float3 |
  UT_Float4 |
  UT_Int |
  UT_Int2 |
  UT_Int3 |
  UT_Int4 |
  UT_UInt |
  UT_UInt2 |
  UT_UInt3 |
  UT_UInt4 |
  UT_Mat2 |
  UT_Mat3 |
  UT_Mat4 |
  UT_Mat2x3 |
  UT_Mat3x2 |
  UT_Mat2x4 |
  UT_Mat4x2 |
  UT_Mat3x4 |
  UT_Mat4x3 |

## Constructor & Destructor Documentation

vl::Uniform::Uniform | ( |  | ) | `[inline]`

vl::Uniform::Uniform | ( | const std::string & | name | ) | `[inline]`

## Member Function Documentation

virtual const char* vl::Uniform::className | ( |  | ) | `[inline, virtual]`

Returns the name of the class.

Reimplemented from vl::Object.

void vl::Uniform::setUniform1i | ( | int | count,
|  | const int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform2i | ( | int | count,
|  | const int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform3i | ( | int | count,
|  | const int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform4i | ( | int | count,
|  | const int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform1ui | ( | int | count,
|  | const unsigned int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform2ui | ( | int | count,
|  | const unsigned int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform3ui | ( | int | count,
|  | const unsigned int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform4ui | ( | int | count,
|  | const unsigned int * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform1f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform2f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform3f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform4f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix2f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix3f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix4f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix2x3f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix3x2f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix2x4f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix4x2f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix3x4f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniformMatrix4x3f | ( | int | count,
|  | const float * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const ivec2 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const ivec3 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const ivec4 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const uvec2 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const uvec3 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const uvec4 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fvec2 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fvec3 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fvec4 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fmat2 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fmat3 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | int | count,
|  | const fmat4 * | value |
| ) |  |  | `[inline]`

void vl::Uniform::setUniform | ( | const int & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const ivec2 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const ivec3 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const ivec4 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const unsigned int & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const uvec2 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const uvec3 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const uvec4 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const float & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fvec2 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fvec3 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fvec4 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fmat2 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fmat3 & | value | ) | `[inline]`

void vl::Uniform::setUniform | ( | const fmat4 & | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | float * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | int * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | unsigned int * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | ivec2 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | ivec3 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | ivec4 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | uvec2 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | uvec3 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | uvec4 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fvec2 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fvec3 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fvec4 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fmat2 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fmat3 * | value | ) | `[inline]`

void vl::Uniform::getUniform | ( | fmat4 * | value | ) | `[inline]`

EUniformType vl::Uniform::type | ( |  | ) | const`[inline]`

int vl::Uniform::count | ( |  | ) | const`[inline]`

void vl::Uniform::initFloat | ( | int | count | ) | `[inline, protected]`

void vl::Uniform::initInt | ( | int | count | ) | `[inline, protected]`

void vl::Uniform::initUInt | ( | int | count | ) | `[inline, protected]`

## Friends And Related Function Documentation

friend class GLSLProgram`[friend]`

## Member Data Documentation

std::vector<float> vl::Uniform::mFloatData`[protected]`

std::vector<int> vl::Uniform::mIntData`[protected]`

std::vector<unsigned int> vl::Uniform::mUIntData`[protected]`

EUniformType vl::Uniform::mType`[protected]`

The documentation for this class was generated from the following file:

- E:/VisualizationLibrary/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vl/Uniform.hpp

Visualization Library v2009.07 Reference Documentation
Copyright 2005-2009 Michele Bosi. All rights reserved.
Updated on Mon Aug 10 21:41:45 2009.
Permission is granted to use this page to write and publish articles regarding Visualization Library.