glUniform of arrays

Is it possible to set a specific element in an array (other than the first one), or only the whole array, as it appears to be the case?

As far as i know you can query the location of a uniform array element like “myArray[2]” and then only load data in there.

I am not entirely sure, though. Just try it.


As Jan said “myArray[2]” is a valid uniform name for the GetUniformLocation routine. I’m sure it’s covered in the GLSL spec.
In practice it works for my bone pose transformation array perfectly.