glUniformMatrix4fv expects a pointer to a buffer with 16 floats.
float[16] m1;
struct mat4{
float m00, m01, m02, m03;
float m10, m11, m12, m13;
float m20, m21, m22, m23;
float m30, m31, m32, m33;
};
mat4 m2
The following are all valid:
glUniformMatrix4fv(MatUniformLoc, 1, GL_FALSE, &m2);
glUniformMatrix4fv(MatUniformLoc, 1, GL_FALSE, m1);
From the documentation:
count
For the matrix (glUniformMatrix*) commands, specifies the number of
matrices that are to be modified. This should be 1 if the targeted
uniform variable is not an array of matrices, and 1 or more if it is
an array of matrices.
[...]
value
For the vector and matrix commands, specifies a pointer to an array of count values that will be used to update the specified
uniform variable.