Picking triangles in OpenGL core profile when using glDrawElements
问题 I am drawing a mesh of triangles using glDrawElements and would like to be able to pick/select a triangle using the mouse click. The mesh of triangles can be very big. In fixed-function OpenGL there is the possibility of using GL_SELECT: http://content.gpwiki.org/index.php/OpenGL:Tutorials:Picking .. However I am only interested in using OpenGL core profile. Another possibility would be to use 'color coding': http://www.lighthouse3d.com/opengl/picking/index.php?color1 http://www.opengl.org