Picking (again): Strange Hits

Hello all!

I am trying something like a math plotter application that shows a series of polygons (GL_LINE_STRIP) and allows me to click on one of them to get the index of this polygon. One polygon has one name.

First I thought everything works fine: I could click on the lines, got their index and could display them in a different color.
But now I noticed that sometimes this doesn’t work. There are some points in my scene where I get more hits than I should. I walk along one of the polygons and repeat clicking on it with distances of some pixel. On most positions I get the name of this polygon but when I move lets say 3 pixels further I get 2 or 3 or even 4 hits! The correct one is among them but the others really shouldn’t be there. When I continue along the polygon the result is ok.
And I can repeat this behavior going backwards: At the same position I get more hits and get only one when I am back at the start position.

I commented out the glRenderMode(GL_SELECT) statement so that I can see what’s inside my picking area and there really is only one polygon. But still when I switch back to render mode I get more than one hit.

What’s that? Where do these hits come from?

I know that there are some things you can do wrong and it took me some time to get this far (:slight_smile: but when I see that there is just one line in my pick box what else can cause this behavior?
I read a lot in the forum where people are complaining about OpenGL picking but this is basic stuff and should work, right? So I guess I made a mistake but where?

Thanks for any helping hint!

Ok, I found out what’s wrong
It seems I did everything right. After testing on other machines I noticed that my picking worked on all (2) PCs that don’t have ATI chips (!?!).
These PCs have NVidia chips (one onboard, one with separate graphic card).

It didn’t work on two ThinkPads with FireGL Hardware.

After knowing that I searched the internet and read that people say anti aliasing would result in chaotic results.
So here is my next problem: Can anybody tell me which option so change in the catalyst driver? I tried “leave it to the application” but that changed nothing in my picking results.

I will surely try one of the other alternative picking methods but I really would like to get this working - just to be able to say “It’s finished.”