> I've read about "picking" in OpenGL

Beware that "selection mode" is not available in OpenGL ES.

> I want to understand if there are other solutions.

You have various options, but none is simple:

1. unproject from the (x,y) screen coordinates to a ray in model
space, and work out which object(s) intersect that ray.

2. unproject from the (x,y) screen coordinates and the corresponding z
coordinate from the depth buffer to a point in model space, and work
out which object includes that point.

3. Draw your entire scene a second time into an off-screen framebuffer
(possibly at lower resolution), but instead of using the objects'
actual textures or colours, use a unique colour for each object.  Then
just look at the colour in this framebuffer at the selected (x,y)
point, and you can decode the corresponding object.

These are all general techniques.  Sometimes your application will
have characteristics that let you do something simpler, e.g. a
constrained projection or object layout.

Good luck!


Phil.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to