I have a glutSolidSphere that I wish to disappear if I click it, but then I have to translate the worldcoordinates to x, y coordinates. And how do I do that? With gluUnProject, and in that case, how???
Or should I do this with glReadPixels, but then I won’t be able to change the color of the thing I wish to “click”, or will I?
well, translating world coordinates to xy coordinates is projection, so you’d use gluProject. gluUNproject reverses that process, and converts xy screen and z coordinate into its corresponding world coordinate.
if you want to know if you’re clicing the sphere, i’d guess you’d use the selection mode
hope this helps