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
The GLSL ES 2.0 specification states that attributes cannot be declared as arrays.
In desktop GL, you can have attribute arrays. When the attribute is assigned an attribute index (either with glBindAttribLocation
or automatically by the shader being linked), it will get consecutive attributes, starting with the one you requested if you used glBindAttribLocation
. So if foo
was given the location 5, foo[0]
would be 5, foo[1]
would be 6, and foo[2]
would be 7.
If there is some ES 2.0 extension to allow attribute arrays, it would likely work like this.