How do I select an object in OpenGL ES?
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.
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
精彩评论