Much of the OpenGL literature that I’ve skimmed does not seem to address whether there are special concerns with selecting/picking in a scene which contains non-opaque objects.
As I continue to further my understanding of how to handle non-opaque objects, I’ve learned that, in a scene containing opaque and non-opaque objects, I should render objects according to this basic sequence:
- With the depth buffer in normal mode, draw all opaque objects in arbitrary order.
- With the depth buffer in read-only mode, draw all non-opaque objects in the order from furthest-from-camera to closet-to-camera.
What happens when you want to draw in GL_SELECT mode?
If the only object I want to pick is the one that’s behind the mouse pointer but closest to the camera, then it would seem appropriate to make every object opaque, and then draw them in arbitrary order with the depth buffer in normal mode.
If I want the full “shishkabob” of objects which are behind the mouse pointer, then what? Would I make all the objects non-opaque, and then draw them in the order from furthest-from-camera to closet-to-camera?
Thanks in advance, and apologies again for asking something which has probably been asked many, many times before.