This is an android port of the Ray Picking gluUnProject sample described in the excellent Blog Post and sample code by Nova Box.
If you would like to understand the concept behind recognizing touch events on OpenGL objects using Ray Picking I can only recommend the mentioned Blog Post.
This code has been tested on Android 4.0.3 and 2.3.7 and is provided without any warranties as is.
For convenience reasons I included a Fragment hosting the GLSurfaceView so you need to include the Support Library (android-support-v4.jar).
- Portrait Mode - I have not yet figured out what causes the Portrait mode to fail so the Activity is forced to Landscape
most likely you would like to add other objects so feel free to change the code. a good starting point to add custom objects are the initObjects and drawModels Methods in the RayPickerRenderer class.