picking and vbo

Hello,

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 ?

Coordialy,
FireBird.

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.

Be careful using RGBA to encode object IDs, if the user has forced AA on this can alter your values.

Ok i see. I will try with color rendering, but if the guy force AA :frowning:

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

Thx.

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).

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 ?

You said it yourself (bounding volumes) :slight_smile:

Just to say that it’s better when it’s used with a octree or bsp tree! :wink:
(or other space partitionning algorithm)

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.