Recommended Posts

The opengl call glMultMatrix takes matrices in column-major format, right?
So that's:
0 4 8 12
1 5 9 13
2 6 10 14
3 7 11 15
So if do a, say...typedef float matrix4[16], then set
matrix4 matrix;
matrix[12]=2.0f;
matrix[13]=2.0f;
matrix[14]=2.0f;
matrix[15]=1.0f;
and call glMultMatrixf(matrix),
that would be equivalent to calling glTranslatef(2.0f,2.0f,2.0f), right?
Now say I have a bunch of objects, and each have their pose matrix.
The loop to draw them would look something like this:
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
for each object
{ glPushMatrix(); glMultMatrixf(object.pose); glPopMatrix();
}
Do I have this right?