…the previously explained code that creates the icos. and toruses
glPopMatrix;
Are you impressed? You should not be,… yet. This system of objects looks very impressive but still you can see that the objects follow a certain pattern. If we add another rotation just before drawing the current scene, then things become quite chaotic:
glPushMatrix;
glRotatef(angle,1.0,1.0,1.0);
drawCubeSphere;
drawIcoToruses;
glPopMatrix;
If now we 'forget' to clear the color buffer, but remember to clear the depth buffer we could have a commercially looking screen saver!
PS: Thanks to Chris Mathers for the clearing the depth buffer idea.