I am fairly new to Opengl. I have a question related to picking and dragging. I searched some posts here but cannot find related answers. My problem is as follows.
The line_loop (2D) is created by opengl. I need to pick a vertex of the line segment and then drag it to somewhere in the 2D screen.
If I pick up the vertex of the line, the buffer can be created from glSelectBuffer. The problem is that how I can know which vertex is selected from the returned buffer? The buffer stores the name of the vertex. But it seems the vertex does not has a name in GL_RENDER mode.
Wouldn’t it be easier to simply check the vertex positions against the mouse position or whatever pointing device you use for picking and dragging in your code? (I suppose you have access to the vertex data of your line loop)