View Full Version : picking and vbo

12-09-2006, 03:43 PM

I'm using opengl picking (select mode and pushname) for select object on a mouse click. No problem with my 7600GT and VBO enable. But if I try on an X300 or X700, or a 7300 with VBO enabled, there is a lag of 1/2sec when the picking is computed!!

If I put all in Vertex Array no probleme with theses cards. That is very strange, why VBO works fine globaly, but not when picking is processed ?


12-10-2006, 12:22 AM
probably is due to software processing of the picking, I think it was mentioned on these forums that picking might be done in software on some cards... guess you are safer rendering the objects without lighting and encoding pointers into RGBA colors yourself.

12-10-2006, 12:30 AM
Be careful using RGBA to encode object IDs, if the user has forced AA on this can alter your values.

12-10-2006, 05:03 AM
Ok i see. I will try with color rendering, but if the guy force AA :(

But how do they works for games like MMORPG ? Picking works nice on all cards.


12-10-2006, 06:33 AM
Usually it is done manually, by determining which object would intersect the ray you cast on pointer position. Actually there is no need to use OpenGL picking at all... (it is much slower anyway).

12-10-2006, 09:29 AM
Ok. Thx, but what is the best method to determin with object is casted ? I know how to take the picked X,Y,Z coordinate but after ?

If i try for each tri... Or maybee I can test with bounding volume ?

12-10-2006, 09:53 AM
You said it yourself (bounding volumes) :-)

12-10-2006, 10:50 AM
Just to say that it's better when it's used with a octree or bsp tree! ;-)
(or other space partitionning algorithm)

12-10-2006, 10:55 AM
Yes, with octree It will be better. But bounding give an approximative picking. I will implemant this method with bounding, and I'll try to with color picking.

Thx again.