How does this work - I know it is used to select objects - will it also be useful for panning and how could I do this?

The selection buffer is quite a complicated matter. It can be used to check if the mouse is over some geometry, like for instance when you press a mouse button and want to know where in your world did the user click.

I would recomend reading the Red Book, not only they do a great job explaining how to use the selection buffer but they also provide alternatives for selection.

As for panning, the answer is no. The selection buffer has nothing to do with camera movements.


If i do a world editor, how can it be possible to have a relation between where you click and OPENGL ?

Mustn’t you calculate yourself with your vertexes/VIS and the FOV ?

If it is possible with OPENGL, where could I find help or could you just send a short code to understand the principle ?

thanks 2’times

Check for the picking example…