…ok so i have read up on some picking this weekend, and i understand it much better. here is my question …from all the tuts i have seen each object drawn has an ID, which goes into glPushName(ID) etc etc. well in my case i have one object but made up of a triangle strip.
what i have drawn is heightmap. i have had posts about this project i am working on and things are going well with it. i want to be able to pick anywhere on the heightmap and for openGL to return the height value of the heightmap:
Question 1: in my glPushName(ID) call do i assign an ID number for every triangle? (i have 297 points in all so about 99 triangles.)
Question 2: what if the mouse pointer is not on an actual vertex value, i.e.(an x,y,z coord that was stored in my array when i was drawing the heightmap). Yes, i could just guess and say VertexA - VertexB on that certain line segment, but that would not be accurate and just a guess. so what would your suggestion be? i hope i have made this question clear enough.
please respond if you think you can help and all suggestions appreciated! thanks in advance!