Creates a new, 2 component, attribute whose value remains constant across all the vertices of a primitive without needing to duplicate the value for each vertex.
The constants (component0
, component1
) represent a 2 component float vector which should have a corresponding
declaration in GLSL code like:
[| attribute vec2 name; |]
context |
A Context |
name |
The name of the attribute (used to reference it from GLSL) |
component0 |
The first component of a 2 component vector |
component1 |
The second component of a 2 component vector |
A newly allocated Attribute representing the given constant vector. |