Picking a point using OpenGl
lola last edited by
Hi, I have an application that draws a triangular mesh using OpenGL, and I need to be able to pick up (select) a vertex of the mesh with a mouse click, I mean, I need to know which vertex was clicked.
Does anyone knows how to do this????
cpscotti last edited by
OpenGL stuff are draw-only and they don't "reside" nowhere.
You should have your own "model" of whatever you are drawing and compare a click event to that data instead of the actual drawing.
minimoog77 last edited by
You will need to do some raycasting and detect if the vertex is near the ray.