View Full Version : Help with glMultMatrix

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

softland_gh

12-19-2000, 03:24 AM

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

softland_gh

12-19-2000, 11:13 AM

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

Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.