Using glMultMatrix*
i don't follow... how is your explanation different from what i did? i thought i did the same as your explanation... can you tell me where's my mistake?
Ok, so you did this:
//X Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[0],theMatrix[4],theMatrix[8]);
//Y Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[1],theMatrix[5],theMatrix[9]);
//Z Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[2],theMatrix[6],theMatrix[10]);
it should be:
glVertex3f(0,0,0);
glVertex3f(theMatrix[0],theMatrix[1],theMatrix[2]);
//Y Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[4],theMatrix[5],theMatrix[6]);
//Z Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[8],theMatrix[9],theMatrix[10]);
what you were doing would work on the transpose of an openGL matrix
hope that helps
-Dan
//X Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[0],theMatrix[4],theMatrix[8]);
//Y Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[1],theMatrix[5],theMatrix[9]);
//Z Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[2],theMatrix[6],theMatrix[10]);
it should be:
glVertex3f(0,0,0);
glVertex3f(theMatrix[0],theMatrix[1],theMatrix[2]);
//Y Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[4],theMatrix[5],theMatrix[6]);
//Z Axis
glVertex3f(0,0,0);
glVertex3f(theMatrix[8],theMatrix[9],theMatrix[10]);
what you were doing would work on the transpose of an openGL matrix
hope that helps
-Dan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement