View Full Version : HELP! How to Pick object on the screen?
10-05-2000, 03:00 AM
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.
10-05-2000, 08:07 AM
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.
10-07-2000, 06:57 AM
The selection buffer lets select stuff (go figure eh? http://www.opengl.org/discussion_boards/ubb/wink.gif ) 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
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.