Help with glMultMatrix

Hi,
If C is the current matrix and I call glMultMatrix{fd} with D, then the NEW current matrix is CD or DC?

Thanks
MMM

Well, it depends on how you imagine vertices. If you think verices are presented as rows then it’s DC with D and C formatted in column major. If you think verices are presented as columns then it’s CD with D and C formatted in row major. That’s because vertices are multiplied first with the last matrix multiplied with the one in the stack.
In other words:

If V is a coumn then Vt=CDV.
If V is a row then Vt=VDC.

The red book p. 73 says that after the multiplication is the current matrix always C*D

If you think carefuly of what I posted, you’ll see that it’s the same. It’s a matter of assuming whether vertices are columns or rows.

Originally posted by MatrixMagic:
The red book p. 73 says that after the multiplication is the current matrix always C*D

Thanks… i think i understood.

marcio