PDA

View Full Version : Screen Coordinates -> World Coordinates



marcelo_g_souza
06-24-2003, 06:24 AM
Is it possible to get the world coordinates in 2D given the screen coordinates( relative to the context beeing displayed )?

And vice-versa?

I need this to select objects in the screen using the mouse.

thx in advance, rgds,

Marcelo

Rog
06-24-2003, 07:54 AM
Look at -

gluProject()
gluUnproject()

and also consult the Red Book chapter on Selection and Feedback. I think there's some tutorials at NeHe too....