To main page | 3dengine.org
Row-major / Column-major ordering
Column major order is used in matrices in OpenGL.
In real
matrix math the ordering is row major, so the elements go like this:
Row major (real world matrix math):
[ 0 1 2 3]
[ 4 5 6 7]
[ 8 9 10 11]
[12 13 14 15]
Column major (OpenGL uses this order):
[0 4 8 12]
[1 5 9 13]
[2 6 10 14]
[3 7 11 15]