G3D::VertexAndPixelShader::ArgList Class ReferenceBindings of values to uniform variables for a VertexAndPixelShader.
More...
#include <Shader.h>
List of all members.
|
Public Member Functions |
| void | clear () |
| template<class T> |
| void | set (const std::string &arrayName, const std::vector< T > &arrayVal) |
| template<class T> |
| void | set (const std::string &arrayName, const G3D::Array< T > &arrayVal) |
| void | set (const std::string &var, float val) |
| void | set (const std::string &var, const Vector2 &val) |
| void | set (const std::string &var, const Vector3 &val) |
| void | set (const std::string &var, const Vector4 &val) |
| void | set (const std::string &var, const Color3 &val) |
| void | set (const std::string &var, const Color4 &val) |
| void | set (const std::string &var, const Matrix3 &val) |
| void | set (const std::string &var, const Matrix4 &val) |
| void | set (const std::string &var, const CoordinateFrame &val) |
| void | set (const std::string &var, const Texture::Ref &val) |
Friends |
| class | VertexAndPixelShader |
Classes |
| class | Arg |
Detailed Description
Bindings of values to uniform variables for a VertexAndPixelShader.
Be aware that the uniform namespace is global across the pixel and vertex shader.
GL_BOOL_ARB and GL_INT_ARB-based values are coerced to floats automatically by the arg list.
Member Function Documentation
| void G3D::VertexAndPixelShader::ArgList::clear |
( |
|
) |
|
template<class T>
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
arrayName, |
|
|
const std::vector< T > & |
arrayVal | |
|
) |
| | [inline] |
template<class T>
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
arrayName, |
|
|
const G3D::Array< T > & |
arrayVal | |
|
) |
| | [inline] |
GLSL does not natively support arrays and structs in the uniform binding API.
Instead, each element of an array is treated as a separate element. This method expands out to setting each element of an array. You can instead set them using args.set("arry[3]", myVal). Likewise for structs, args.set("str.foo.bar", myVal).
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
float |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Vector2 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Vector3 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Vector4 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Color3 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Color4 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Matrix3 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Matrix4 & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const CoordinateFrame & |
val | |
|
) |
| | |
| void G3D::VertexAndPixelShader::ArgList::set |
( |
const std::string & |
var, |
|
|
const Texture::Ref & |
val | |
|
) |
| | |
Friends And Related Function Documentation
The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:48 2007 for G3D by
1.5.2
Hosted by
|