How to select an object in OpenGL ES?

I am writing an iPhone / iPad application using OpenGL ES.

I would like to select (or select) one of the three-dimensional objects by clicking.

OpenGL seems to use the glSelectBuffer () and glRenderMode (GL_SELECT) methods for this purpose, but they are not available in OpenGL ES.

How to select an object in OpenGL ES?

I saw the same questions on some forum sites, but I did not find a sufficient answer ...

Selecting an object by clicking can be a common task in iPhone OpenGL ES applications, so I believe there should be an easy way ...

Thanks.

+4
source share
1 answer

there is a very easy way to do this with color coding, check out the tutorial here: http://www.lighthouse3d.com/opengl/picking/index.php?color1

+2
source

Source: https://habr.com/ru/post/1314421/


All Articles