It's time to test the program out again by running it. Before you do, try and imagine what you might see. I can bet you won't see what's about to come. Run your code (and get it running) before moving on to the next point.
If your cube flew off into the distance, as shown in Figure 6.3, then the program is running as it should:
(Figure can't copy)
Here's what's happening. In each main loop, the object class's update method is called. This runs a glTranslatef () method before drawing the mesh. It does this for every frame. The thing with glTranslatef ( ) is that it's compounding. So, in each loop, $z=-1$ is added to the position of the cube and this animates it flying off into the distance. So, how do we fix this?