I had a problem when using selection mode to pick glutSolidSpheres in the scene.
I have 43 spheres, with each name as 1-43.
The problem is, if I dont click on the spheres, the selection buffer indicates I have picked the last spheres, that is, selectBuff=43, and the hit value given by glRenderMode(GL_RENDER) call is 1.
If I click on, for example, sphere with name=33, the glRenderMode(GL_RENDER) return value is 2. and the selection buffer indicates that I have clicked both sphere 43 and sphere 33.
I am not able to provide the code because it is in my work place. I will be able to provide the code after this weekend.
Right now I just want to ask you guys that, what kind of mistake might cause this kind of problem?