views:

152

answers:

1

I'm writing an iPhone/iPad app using OpenGL ES.

I'd like to select (or pick) one of the 3D objects by tapping.

In OpenGL, there seems to be the way using glSelectBuffer() and glRenderMode(GL_SELECT) for this purpose, but these are not available in OpenGL ES.

How do I select an object in OpenGL ES?

I saw the same questions in some forum sites, but I haven't found any sufficient answer...

Picking an object by tapping may be a common task in iPhone OpenGL ES applications, so I believe there has to be a simple way...

Thanks.

A: 

there is a very simple way of doing that with color coding, check the tutorial here: http://www.lighthouse3d.com/opengl/picking/index.php?color1

Alexander Voloshyn
Thank you very much for your answer! I'll try that method and see if it is applicable for my 3D application.
Kura
I've tried this method and it worked exactly as I wanted!! Thank you again for your help!!
Kura