OpenGL Matrices

what’s the correct oder of elements in OpenGL? is it:

0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15

or

0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15

It’s depend on the notation you use, if you use
pre-concatenated matrix this layout is use:

0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15

or if you use post-concatenated matrix this layout is use:

0 1 2 3
4 5 6 7
8 9 10 11
12 13 14 15

Did you see that, both representation is transpose each other. and the code you use to concatenate matrix is the same.

per definition it’s
0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15
post-multiplied