PDA

View Full Version : Selection Buffer



spoofy13
06-10-2008, 07:49 AM
I am currently working on learning how to use the selection buffer and I am a little confused. Here is what I am doing. I have currently loaded a texture onto a polygon and drew 3 different shapes on top of the texture. None of them are touching and there is one Cyan Triangle, one small red triangle and one medium green rectangle. I would like to select the green rectangle only, but am unsure how to manipulate this into the code I have already created.

V-man
06-10-2008, 08:37 PM
The selection buffer is for selecting geometry, not images in a texture. You need to render your shapes and then you will be able to select.
As an alternative, use a intersection detection library instead of using the GL selection feature which is kind of old.

spoofy13
06-11-2008, 05:10 AM
I understood that, and that is actually what I am trying to do. I am rendering three different shapes and would like to be able to select them, but the code I am using to put the selection buffer into is not allowing it to work. It could be the way I am minipulating the selection buffer in the code and I will try and put my code up later today.

Thank You