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.
-
Change the Vertices coords to where you want the ball.
-
(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.