Sean06
08-29-2011, 09:14 PM
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.
Thank you in advance!
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.
Thank you in advance!