Ported from GLUT to SDL