Hi everyone!

I read-in objects from a 3d-file and would like to pick a 3d object to display a related string. Displaying it will not be the problem, but I don´t know how to do picking as I did not fully understand the chapter in the red book. I have only one glVertex call, which draws all the points of the scene. Do you have any hints how to proceed? (I fear the question is a bit general…)
Thanks in advance!

jep, it’s a bit general if you want a specific answer on it…

paste your code here if it’s so simple

Ok, I´m sorry!
The few lines are written in Fortran, hope it does not matter.


  • px,py,pz, !+ Normals

if(ksteu.eq.1)then !+ksteu=1->new area
if(ipena.gt.-1) call glend()
call glbegin(gl_polygon)
call glNormal3f(px,py,pz)

else if(ksteu.eq.2)then !+ksteu=2->point of area
//all material properties and colours

dpx=(px-xm0)*scal0 !+xm0… center of cubus
dpy=(py-ym0)*scal0 !+scal0 is a constant
call glvertex3d(dpx,dpy,dpz) !+The one and only draw command

else if(ksteu.eq.4) then !+ksteu=4->end of area
call glend()

I tried to reduce it to a readable size. Does it help?