Some clarification about glMultMatrixd

I need some clarification about how glMultMatrixd works.

Suppose I have two matrices: I extracted the first 3x3 portion. It gives the rotation part of the matrix. Isn’t it?

Now I have extracted two rotation matrices matrot1 and matrot2 respectively.

If I use the following glMultMatrixd two times :

glMultMatrixd(matrot1);

glMultMatrixd(matrot2);

Does the result gives the matrix which combines the rotation of both matrices?

Any clarification will be highly appreciated.

Yes it should be the same as current_matrixmatrot1matrot2 (if the current matrix is the identity than just matrot1*matrot2 is fine). Just remember that it tries to multiply a 4x4 matrix so even though you extract the rotational part you still need to fill in the other parts of the matrix or just create the math functions yourself.