PDA

View Full Version : Problems picking the right object



03-06-2001, 04:18 AM
I try to pick objects using the glSelectBuffer and the glPickMatrix.
I get the correct number of hits using glRenderMode(GL_RENDER).
Then I try to get from the buffer the object name that is closer to the camera.
but I cannot understand the way data is passed into the buffer.
e.g. once I click on three objects I get somthing like
1,mindist,maxdist,1,2,mindist,maxdist,1,2,3,mindis t,maxdist,1,2,3,....
and another time something like
1,mindist,maxdist,1,3,mindist,maxdist,1,2,3,4,mind ist,maxdist,1,2,3,4,...

How should I read the buffer?
Is there another ,easier or faster, way to get the selected object name?

RandyU
03-06-2001, 08:04 PM
Maybe it's due to you pushing names.
There is no need to do this.
Push name only once at start, then just glLoadName.

Randy