-
Notifications
You must be signed in to change notification settings - Fork 26
Uniform
Alessandro Febretti edited this page Oct 27, 2014
·
6 revisions
Last revision: ver. 6.0 - 26 October 2014
Represents a shader uniform value.
Method(s) | Description |
---|---|
**static** Uniform create(string name, UniformType type, int elements) |
Creates a new uniform |
UniformType getType() |
Returns the uniform type. |
Scalar value access | |
setInt(int value) , int getInt()
|
|
setFloat(float value) , float getFloat()
|
|
setVector2f(Vector2 value) , Vector2 getVector2f()
|
|
setVector3f(Vector3 value) , Vector3 getVector3f()
|
|
setColor(Color value) , Color getColor()
|
|
(v6.0) Array value access | |
setIntElement(int value, unsigned int index) , int getIntElement(unsigned int index)
|
|
setFloatElement(float value, unsigned int index) , float getFloatElement(unsigned int index)
|
|
setVector2fElement(Vector2 value, unsigned int index) , Vector2 getVector2fElement(unsigned int index)
|
|
setVector3fElement(Vector3 value, unsigned int index) , Vector3 getVector3fElement(unsigned int index)
|
|
setColorElement(Color value, unsigned int index) , Color getColorElement(unsigned int index)
|
Currently supported uniform types are listed in the UniformType
enumeration:
Float
Int
Vector2f
Vector3f
Color
NOTE: The color uniform type maps to a
vec4
type in the GL shading language. The use ofColor
here is due to lack of a Vector4 type in the used python math library (euclid).