View Full Version : picking and highlighting

06-17-2002, 11:27 AM
Hi ..
I posted the same question in the beginners forum, but no one replied....So I am posting it here .....
I have a very big scene, which might have around , 50000 objects. On glutMotionFunc , I rotate the object and on glutMouseFunc, I need the object to be selected and highlighted....
- I use GL_SELECT for selection... I do not want to redraw the entire scene....after selection to do the highlighting.... The examples in the redbook do not explain picking without redrawing....
-For highlighting, my machine is not supporting overlays...

So, I want to know 2 things...
1) How to avoid redrawing on Picking ?
2) What techinque can be used for highlighting...??

Thanx in advance..

06-17-2002, 01:00 PM
I think we did answer your question. You need to research frustum culling methods in order to reduce the number of objects being sent through the selection render.

06-17-2002, 03:02 PM
Well if you don't want to raycast your scene you'd better redraw with GL_SELECT on.

This will not actually redraw the scene to the framebuffer it will transform it (probably in software) for pick testing.

One way to make this faster is to partition the scene into a higherarchy of volumes, then you pick on the volumes. For any volume you hit you pick on the contents. This way you end up picking a fraction of the stuff. Be careful with clip on the nearest volume or the volume you occupy.