PDA

View Full Version : Selecting only fully enclosed objects



camelo
02-07-2000, 04:41 AM
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.

paolom
02-07-2000, 07:01 AM
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 http://www.opengl.org/discussion_boards/ubb/tongue.gif
Take a look at gluPickMatrix: the GLU specs are very clear on how to use it for selecting objects restricing to near the cursor.