In GLSL-ES it's possible to have arrays. For example, the GLSL ES Specification gives the following example of a uniform variable that's an array:
uniform vec4 lightPosition[4];
Is it possible to have vertex attributes that are arrays? In other words, is the following legal according to the spec?
attribute vec4 foo[3]; // three vec4s per vertex
Is the answer (either yes or no) explicitly mentioned anywhere in the GLSL ES Specification? (I can't find it, but I haven't read every line of the spec.)
Also, if it is legal, how does one initialize such an attribute using the OpenGL ES 2.0 API? (Assuming glVertexAttribPointer
would be used, what is the layout of the vertices/array-elements/vector-elements?)