I have an array in my vertex shader like this:
uniform mat4 MeshTransforms;
At the moment I'm just updating the entire array of matrices like so:
int meshTransforms = ARBShaderObjects.glGetUniformLocationARB(shader, "MeshTransforms"); ARBShaderObjects.glUniformMatrix4ARB(meshTransforms, false, UnitTransformMatrices);
UnitTransformMatrices is a float buffer containing the transform matrices of some units.
I'd like to just update a single matrix in the array (just update one unit transform matrix). So how can I overwrite a single matrix in the middle of the matrix array?
This is using the LWJGL, so I'm limited to the functionality it provides.