GL has a `select` feature where you can get feedback about what is at a given location.
Also you might look into first rendering a color-coded flat-shaded view of the scene, using it to pick the pixel color beneath the mouse, and then this ties in exactly with which polygon you clicked on ... then render the scene properly. You give a unique color to each polygon and then you can tell exactly which polygon you're clicking on.
Also you might look into first rendering a color-coded flat-shaded view of the scene, using it to pick the pixel color beneath the mouse, and then this ties in exactly with which polygon you clicked on ... then render the scene properly. You give a unique color to each polygon and then you can tell exactly which polygon you're clicking on.