well I have a JOGL program which detects ball bounces off walls and other balls, but instead of the balls being removed from the program the best I can manage is to make them not be displayed. I have asked a similar question (why balls are disappearing and got an a good answer) but afterwards got noticed this one I tried looking for some sort of remove method with the intelisense in netbeans to no avail ._.
the ball is drawn with the code below
void display(GL gl) {
gl.glLoadIdentity();
gl.glTranslatef(position[0], position[1], position[2]);
gl.glColor3fv(colour, 0);
if(ballGone == false)
{
glut.glutSolidSphere(radius, 10, 10);
}
else
{
glut.glutSolidSphere(0, 0, 0);
}
}
any help would be appreciated