Search code examples
openglfeedbackinteraction

Opengl Selection Buffer


I'm using opengl's selection buffer, but i'm experiencing a trouble, the "picking" works perfectly if you hit the element for the first time, but the second time you hit it, it won't get selected, instead the element selected is an arbitrary one on the model. Any hints on this? Is it a bug or am I doing something wrong?


Solution

  • The problem was that when I was picking on the polygon I wasn't careful enough to relabel it when changing the color, that's why it wasn't getting picked again.