demongolem

12-01-2010, 10:53 AM

Hi all,

I am sure I am thinking about this problem wrong. Can someone please clarify my thought.

What I want to do is as follows. I apply certain transforms and then I draw glutSolidSphere at the current coordinate based upon my transformation matrix. I then want to apply further transforms and draw another glutSolidSphere at the new coordinate. I would like to connect the 2 points together with a line such as using GL_LINES (actually the line is more important for me than actually drawing the spheres). If I do my GL_LINES at the end, I can have (0.0f, 0.0f, 0.0f) as my second vertex, but how do I get the coordinate for the first vertex of the line which represents the first sphere I drew.

I am sure I am thinking about this problem wrong. Can someone please clarify my thought.

What I want to do is as follows. I apply certain transforms and then I draw glutSolidSphere at the current coordinate based upon my transformation matrix. I then want to apply further transforms and draw another glutSolidSphere at the new coordinate. I would like to connect the 2 points together with a line such as using GL_LINES (actually the line is more important for me than actually drawing the spheres). If I do my GL_LINES at the end, I can have (0.0f, 0.0f, 0.0f) as my second vertex, but how do I get the coordinate for the first vertex of the line which represents the first sphere I drew.