split out glut code - stage 1