Implementing Ray Picking
If you can, do the picking on the CPU by calculating a ray from the eye through the mouse pointer and intersect it with your models. If this isn’t an option I would go with some type of ID rendering. Assign each object you want to pick a unique color, render the objects with these … Read more