As you can see from the above test code I'm not getting the matrix locations I would expect. Afaik a matrix in a GLSL shader takes up 4 128bit registers. When trying to upload the matrices using glUniformMatrix4fv(m_iLocation, 4, GL_FALSE, akMatrices);

Dark Photon

03-31-2011, 06:45 AM

When trying to upload the matrices using glUniformMatrix4fv(m_iLocation, 4, GL_FALSE, akMatrices);
That's the right call. m_iLocation should be the return value of glGetUniformLocation() on "akTest".

As for the rest, looks like you're presuming that "location" should be an offset in floats, but I don't understand why you think it should be. It's just an abstract handle AFAIK.