Hierarchical Picking.......

YES GUYS - I CROSS POSTED THIS IN THE BEGINNERS SECTION ALSO - I figure I’ll get a quicker response here after all. I’M SORRY, I’M SORRY, I’m, well, sorry.

Hi,

I am wanting to do hierarchical picking. I’m not too sure (by looking at FAQs), what the arrangement of the selection buffer output should be in any given circumstance.

Say for example, I do the following (after correct setup of selection):

glPushName ( AXIS );

glPushName ( MARKER );

glPopName ();
glPopName ();

glPushName ( OTHERTHING );

glPopName ();

…ok and I click on `marker’ - I want to know (a) that AXIS was clicked and (b) that MARKER on AXIS was clicked. What is the bytewise\format of the selection buffer in this case? Also, if OTHERTHING is behind MARKER and I click MARKER - OTHERTHING will be returned in the buffer. I have to depth sort to get MARKER (or is it AXIS?).

Anyway, please explain this to me in slow, painful and laborious detail.

e.g.
"
The first two bytes are a short ID,
The third, to the sixth bytes are the z depth, etc."

Thanks.