hi,
just a quick question on gluUnproject…
up until recently I thought that if i called something like
gluUnProject ((GLdouble) x, (GLdouble) y ,(GLdouble) 0, modelview, projection, viewport, &wx, &wy, &wz);
where the z-value equal to zero, this would correspond to the near-clip plane,
and if i called…
gluUnProject ((GLdouble) x, (GLdouble) y ,(GLdouble) 1, modelview, projection, viewport, &wx, &wy, &wz);
this would correspond to the far-clip plane,
i thought this the correct way until i ran into a problem using it,
if i use…
gluPerspective(45.0, aspect, 0.1, 200.0);
i run into problems setting z-value to 0 in gluUnProject for near clip plane, if i change it to 0.1 in gluUnProject call, however things work just fine,
this is the problem i had, if i translated my view, and this entailed a zoom factor, whenever i zoomed beyond the (0,0,0) mark or say beyond the z=0 mark, my results became erratic,sometimes totaly lost from the screen.
i am not quite sure what the problem was, but if anyone feels like indulging this, it would be appreciated.