I am using OpenGL ES to display the sky in an astronomy app on Android. I need to display thousands of stars, which is no problem. But I need a fast and elegant way to retrieve the positions of those vertices in screen coordinates to know on which star a click (=selection) with the mouse occurred.
I tried with a TransformFeedback, which works but is too slow. I could compute the positions of all stars separately by inversion of the coordinate transformation, which is also slow.
Does anybody know, how other astronomy programs (like Stellarium for instance) perform this task? I do not need specific code but only a general hint on how to do this.
Thanks for your suggestions.
Edit: I have to add that I am using OpenGL ES 3 on an Android device.