need some very basic help

iam very new to opengl…pls help me with this basic Q.

my question is this…

we specify coord’s through glVertex*() and this gets transformed and projected to window coord’s.
now, from the window coords how can i get the original vertex coords back ??


Do some reading on glUnproject. This will recover the x and y position, but you need to supply the z position because this is lost when the transform goes from 3d (world) to 2d (screen) space.

So, given a z in 3d and a screen space position in 2d (x, y), it will find you the correct x, y for the given z.

Hope this helps!

thanx a lot.

gluUnProject (I mean) - not glUnproject!!