Animation

how can I do animation in opengl
for example, a small ball go from
left screen to right screen.Thanks
a lot!

You can do either one of two things.

  1. Change the Vertices coords to where you want the ball.

  2. (easiest and best) use glTranslatef(x,y,z) where (x,y,z) is how much you want to move the object, you are about to draw, in the respective axis.