Hi,

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

Thanks

MMM

Hi,

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

Thanks

MMM

Well, it depends on how you imagine vertices. If you think verices are presented as rows then it’s D*C with D and C formatted in column major. If you think verices are presented as columns then it’s C*D 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=C*D*V.

If V is a row then Vt=V*D*C.

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