HELP! How to Pick object on the screen?

Hi, I need help on the pick object with mouse on the screen.

I know I should use pushName, loadName… and pickMatrix function.

But I dont know the detail of how these functions work, can anyopne introduce something to me. Please be a bit detail.

Thanx

Well, I havn’t read about it yet, but the book “OpenGL SuperBible” contains a section on how to do just that. (I’m assuming your wanting you, say, click on an object on-screen and be able to select it somehow like in a strategy game or something right?) I’m not sure if it’s mentioned in the older edition of the book which is available online (go to opengl.org’s online books section) but it is definitely in the second edition. It’d be worth a look at the online version of the book though just to see and it’d save you $40.

its all explained in the red book , theres also samples included with glut

I have been curious about this very topic. Push/Pop Name is used for selection, but what about feedback? I am not clear as to when one would be appropriate over the other.
I was thinking of using feedback and the passthrough feature to get me info on the objects.

Any thoughts?

Later, Guy

The selection buffer lets select stuff (go figure eh? ) whereas with the feedback buffer you can return more-or-less anything from OpenGL. Like coords of vertices, stuff like that.

Any one provide detail explanation on selection and feedback - because I’m interested too!

Thanx for the help