|
I'm trying to pass an array of matrices. The problem is that only the first matrix seems to
get passed. Based on my testing it appears that the second one just gets set to zeros.
Has anybody run into this problem?
Any suggestions on what I may be doing wrong?
Any chance it could be a bug with jogl?
This is the java code:
int boneMat_loc = gl.glGetUniformLocation(rendering_program_, "boneMat");
if(boneMat_loc<0)
throw new Exception("Invalid");
float[] matrixPalette=
{1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0,
1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0};
int count=2;
gl.glUniformMatrix4fv(boneMat_loc, count, false,matrixPalette, 0);
This is the partial shader code that receives the matrix:
uniform mat4 boneMat[2];
Any help is greatly appreciated.
|