I am working on a multi-agent application. During a simulation I display the agents present at any timestep. This agent have their own specific id.
I want to identify and interact with those object by using picking. My picking method is working but I cannot get the id of the agent (I only get the id of the geometry that is not correllated wit the one of the agent). So I need to find the way to assign to any new drawn geometry the corresponding id of the agent.
Is there a way in opengl to assign an id when you draw an object (maybe between glBegin() and glEnd()) ?