While the graphical output is completely messed up when I do this, I tried it out of curiousity. I was expecting it to crash due to illegal math operation:
// gl_Position=Projection*Modelview*Position; <- normal, works fine // gl_Position=Position*Modelview*Projection; <- bad output, but still runs fine Position is the vector, the others are matrices.
OpenGL is column-major, which should mean that you can only multiply a vector on the right of a matrix. There is no mathematical way to multiply a vector to the left of a matrix if the vector is a column since the inner dimensions would not match: 4x1 * 4x4
So why do I actually get output when I try it? What is OpenGL actually doing with the vector-matrix multiplication?