The picking works, i can easily detect on which side user clicked. The boxes user clicks are so called "selection boxes". User can "paint" the selection boxes how he wants and edit data in whole that selection.
Selection boxes are textured (basically just green borders with transparency in the middle, so all boxes can be seen through). All boxes have transparency with
This causes a problem. Im picking coordinates with gluUnproject which also works fine but it always goes through the transparent selector and picks up coordinate at the "lowest level the user clicked". If i disable transparency, it picks up the first "textured" item.
I mean, let's say texture is transparent except few parts, gluUnproject detects that transparency, it then goes through that transparent "hole" and stops only if it doesn't find any transparency in his way or until it hits the color of background of the scene (glClearColor).
For selection buffer i can tell exactly, to return only the FIRST item clicked. It doesn't go through transparency, but immediately returns the first face user clicked and ignores everything what's behind the other transparent boxes.
How to tell gluUnproject to do the same?
Should i enable/disable something for a moment when picking with gluUnproject?
As far as i have tested gluUnproject picks up only if user clicked on textured or filled quad.
Is there any command that is responsible about changing this behaviour?
Ok, i have another question, don't want to create new topic.