Problems with GL_SELECT
Submitted by Wolferine on December 3, 2007 - 8:17pm.
Hi!
I have recently installed Tao Framework on Vista and I have a problem with picking. It appears that drawing becomes really slow (times of seconds for one frame) when I enter GL_SELECT mode to do picking. Has anyone got similar problems?
I have profiled my app to see what's going on. The results are that the slowest function is glLoadName(Int32) which consumes 90,22% time. The thing is that, as I said before, it only happens in GL_SELECT. For comparison:
1. in GL_SELECT, time 99 701 ms, 4482 calls -> 22.25 ms per call
2. in GL_RENDER, time 3 ms, 800 calls -> 0.00375 ms per call
Please, help!?

Hi! I work on XP Pro SP2 and
Hi!
I work on XP Pro SP2 and have exactly the same problem. I think it strange because there are in my world only about 200 rectangles, which isn't a huge number.
Since your post have you solved it?
Best regards,
Rensaman
Hi, from my experience I can
Hi,
from my experience I can say you should not implement picking using the selection buffer. Reading from most graphic cards is incredibly slow, and the selection buffer is made for a small number of large objects.
For better control and performance, manual ray casting into the screen seems to be the only option.
I have a scene with a few thousand triangles and picking is still quite fast, although I use no speed-up technique, spatial sorting, not even bounding boxes - hell, I don't even store the triangles but recreate them every frame
Best Regards,
Chris
Since my post I have already
Since my post I have already tried to determine the selected item using gluUnproject (and a simple linear search among the shown quads) and you're right, it is more faster, than the built-in picking.
Thank you for helping!
Best regards,
Rensaman
I'm guessing you both have
I'm guessing you both have ATI cards -- you might get back your GL_SELECT performance if you downgrade to 7.11 catalyst drivers. See
http://www.it.usyd.edu.au/~tapted/slow_glselect.html