PDA

View Full Version : Picking



Dominik
04-13-2002, 10:34 AM
Hi,

i wpuld like to pick a Vertex with the mouse.
I've seen a lot of tutorials about this, but all of them just support a small number ob objects/vertexes. I need to determin a single vertex on an object about 200000 vertexes and 350000 faces. do I have to make a clipping on my own to reduce the number of glLoadName(int) calls?

if so, how to do that?

i read in the red-book, that the numbers of glLoadName(int); calls are limited on each ogl implementation.

please help me out :-)

thanks in adv.

V-man
04-13-2002, 12:03 PM
LoadName will load a new name on top of the stack so you should be able to call it as many times as you want.

You need to call
glInitNames();
to initialize the name stack, then you call
glPushName();
render quad
glPopName();

so you render a quad at every vertex and this allows you to pick them easily, just adjust the size of the quad.

You can do culling to speed things up of course but I'll leave the logic behind that up to you.

V-man