gluProject behind me

Hi,

I use gluProject to figure out the screen coordinates of a certain point in space. This works fine except that I can’t seem to find a way to see if that point is behind me or in front of me with gluProject. Is there a trick for this or am I going to have to manually transform this point using the OpenGL matrices and read its final z-value ?

I haven’t used gluProject but I’d imagine that if you try to transform a point that’s behind you it’d return false. In fact I’d expect it’ll do the same for any point that is not in the view Frustum.

What you need to do is transform the point into view space (or the view into object space) and then work out whether the point is on the view normal side or the “back” side.

Nope, not getting a false… winz value is always or very close to 1.0. Guess I’ll be transforming that point manually then :}

If you have frustum culling in your app, whyncha try running the point thru your near plane on your frustum?