View Full Version : Selection buffer

10-09-2000, 03:55 AM
Any one explain how to implement this?(and provide code/example?)

Thanx in advance

10-09-2000, 07:56 AM
I read about one technique... basically (forgive and dodgy details...) you do two rendering passes - once to your screen buffer, and then for each object, draw it in a flat colour (no lighting) into the stencil (or some other) buffer, and from there read that, match the colour at a particular point to which object is id'd by that colour and Robert's your mother's brother.

hope this helps!

10-11-2000, 04:36 AM
Any details of implementation?

10-11-2000, 05:31 AM
Basic selection code on my site:

10-12-2000, 03:27 AM
selection buffer doesn't allow you to move objects around the scene does it? I think that would be 'picking' - any one have code for this - also would I need to implement selection as well for this to work?

I have a scene with a few objects -
I've got a drawCube function which stores the code for the cube and this can be passed values when called - while implementing the selection buffer I used drawCube(GLenum mode) and called the drawCube function in there - will this work?