Selecting only fully enclosed objects

Hi,

I’d like to know if there is any way of makeing openGL (in GL_SELECT render mode) to only report hits when no part of a given object gets culled out. Currently my application reports selection hits when any primitive hits the view frustrum.

Thanks.


Here is what OpenGL specs say about selection:

Selection is used by a programmer to determine which primitives are drawn into some region of a window.
The region is defined by the current model-view and perspective matrices.

I never had to do selection, but I think it’s a matter of setting the correct matrices
Take a look at gluPickMatrix: the GLU specs are very clear on how to use it for selecting objects restricing to near the cursor.