shapeare
09-21-2011, 02:36 AM
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,
lightTransformPipeline.GetModelViewProjectionMatri x());
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.
Why?
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,
lightTransformPipeline.GetModelViewProjectionMatri x());
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.
Why?