View Full Version : glUniform of arrays

11-27-2009, 01:11 AM
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?

11-27-2009, 04:03 AM
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.


11-30-2009, 07:55 AM
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.