Pick Selection Editing by Points and Lines
Hi, I was hoping to learn how I can use pick selection on individual points or lines. The method of selection I wanted to do this with is rendering the geometry with the render mode: GL_SELECT, then retrieving the picked names using the select buffer.
I really wanted to do this with Vertex Buffer Objects, but after some reading, that seemed like a bad idea. I still don't want to go back to picking using
glBegin() and glEnd() pairs though.
So, I wanted to know if there was a way I could do pick-selection for triangles, points, and lines using different methods of rendering, such as: Display Lists or using glDrawElements(). The latter being most desirable.
The way I intended to implement this is as follows:
I wanted to create a simple modeling program; one where I can select a vertex on a mesh, use some translation functions, and continue to draw the mesh with the new vertex position. This mesh would be divided into individual triangles.
Using glDrawElements(), I wanted to create an array that holds each vertex in the mesh. Vertices would not repeat, so each value in the array would be unique. Then I wanted to use an index array to tell the GPU how to use the vertices. I was hoping to draw the mesh using GL_TRIANGLES as the type of geometry. So therefore, every three elements in the index array specifies one triangle by pointing to 3 different vertices stored in the vertex array.
When pick-selecting a vertex in the mesh and performing translations on it, the vertex array would be updated with the new value of the modified vertex. In doing so, some triangles in the mesh will change their orientations to use the new vertex value.
The same procedure would occur for selecting a line or a whole triangle, 2 vertex values would change for the line, and 3 for the triangle.
If you can post any information relevant to helping me with this, that would be greatly appreciated.
Thanks in advance!
So I did some more homework, and found some information that could be helpful on OpenGL forums. First I discovered there was such thing as "OpenInventor" which seems to be an open source SDK that could have answers pertaining to pick selecting using OpenGL (as well as other functions/utilities for making 3D modeling software).
Anyways I mention this because I want to know what the OpenGL forum community thinks about this.
Will the SDK provide a base source of information so that I can learn the algorithms/design structure to create a 3D modeling engine?
Will this overall help me with my original problem posted above?