PDA

View Full Version : gluUnProject returns wrong values



MacFly
04-25-2004, 04:05 AM
Hi,

I'm using gluUnProject to convert Screen coordinates to OpenGL. For most of the time it works fine but sometimes the function returns wrong value.

For example I move mouse around the screen and Z value are Ok until the cross -120. Then the Z value is suddenly -630. The X value is OK.

I would be grateful for any tip what can cause this problem.

Regards.

endash
04-28-2004, 11:57 AM
Could this be an issue of Z precision in the depth buffer. (I'm honestly not sure, but I feel like there might be something like that going on...)