Ok so i have this sphere with shinnies and specular and some other effects, i am a starter in opengl so what i need is the sphere to go up and down again, it should be like a bouncing ball but like in real life the ball has to stop at some point, i have been searching the entire google and there is not a single project like this, there are some functions that i didn't understand, again i am a starter so sorry from me if this is lame, or an amateur question.


glPushMatrix ();
glTranslatef (0.0, 0.0, -1.0);
glMaterialfv(GL_FRONT, GL_DIFFUSE, mat_diffuse4);
glMaterialfv(GL_FRONT, GL_SPECULAR, mat_specular4);
glMaterialfv(GL_FRONT, GL_SHININESS,mat_shininess4);
glutSolidSphere (1.0, 35, 35);
glPopMatrix ();