I draw 4 Link chain of line segments by using the following code. As shown in the image i need to get the coordinates of Points A,B,C,D.

I am trying to implement a basic CCD inverse kinematic and based on the mouse coordinates i want to move link A-D. The first step to do that is to obtain a vector between the target point and point C and between C-D. For that i need to know the coordinates of C,D at any given time. How can i do that?

It doesn't look like you using view matrix, so your modelview would be actually only modeling. Modeling (or world, as directx calls it) transforms from object space to world space - which, as quesion states, is what you need. Just get resulting matrix with glGetFloatv(GL_MODELVIEW_MATRIX) and multiply (l, 0, 0, 1) vector by this matrix.
–
keltarDec 4 '13 at 10:31

@DexteroidCN WinX and WinY are just the screen coordinates of the point. WinZ is a little more complicated.
–
Approaching Darkness FishDec 4 '13 at 17:06