I am writing software to visualize 3D-triangulated objects. When a user moves the mouse over a vertex in the display, I want to get the information about which 3D object he/she is looking at.
I am thinking of using the glFeedbackBuffer option; but as far as I can see, the GL_FEEDBACK mode only gives me a listing of 2D raster positions of all polygons which were drawn. Some of them may have been clipped, so there may be fewer objects in the feedback buffer than originally drawn. In that case, I don’t know anymore which 3D object corresponds to which 2D raster position. Can anyone give me a hint on how to relate the 2D raster positions to the original 3D ones?
Thanks a lot,
Have a look at my post in this thread.
i think selection buffer would help there(rgpc pointed it out in that post as well). if you have a single model in your scene, that would be even more simple: you’re putting the vertex indexes into a name stack, and when the click happens, you just restore the vertex information from the model’s vertex array.