View Full Version : Selection buffer
Any one explain how to implement this?(and provide code/example?)
Thanx in advance
Khrob
10-09-2000, 06: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!
Any details of implementation?
Pauly
10-11-2000, 04:31 AM
Basic selection code on my site:
http://home.clara.net/paulyg/ogl.htm
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?
Powered by vBulletin® Version 4.2.0 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.