View Full Version : How does gluUnProject work exactly?

03-01-2002, 01:09 AM
Now this probably seems like such an incredibly stupid question - even from me.
i use gluUnProject with my mouse click co-ords X, Y, (and what is Z=0?), i use glGetDoubleV to get Model matrix/Projection Matrix/viewport (should I be calling this where I am rotating/drawing or on mouse-click?), then OX,OY,OZ returns. Im using multiple Push/pop-matrix commands (inside and outside of my main List). My GLOrtho is something like (0,32000,16000,0,-1,1) But OX gives me 2.something and OY gives me -0.something and OZ=-1! What am I doing wrong/if im doing it right then how do I get from 2.something to my glX coord etc.

Help would be much appreciated! THNKS!

03-01-2002, 07:21 AM
Dude, you already have one post on the topic. Stop reposting.