Converted from GLUT to GLFW