Problem with OpenGL Superbible example (solved)

This book uses a library named GLTools in all of its example code.

The book emphasizes that matrices are stored in column major(check the GLTools source code), but in its code examples, when calling glUniformMatrix4fv,
for example

glUniformMatrix4fv(locMVP, 1, GL_FALSE,

the third parameter is always false, which means the matrices it provides are in row major, which is contrary to what they said about their matrices, but it works.


If you read it states:

If transpose is GL_FALSE, each matrix is assumed to be supplied in column major order. If transpose is GL_TRUE, each matrix is assumed to be supplied in row major order.

See which also points you to the 2.1 spec, where the relevant section is:

I don’t think that later versions of the OpenGL spec state this as clearly, since the documentation for LoadMatrix has gone, but this bit of advice hasn’t been put anywhere else.

Thank you very much.

I should have checked the specification first.