can somebody explain please, what exactly glutMainLoop does? and is the order of the functions in main important or not?
int main(int argc, char *argv[])
{
glutInit(&argc, argv);
glutInitWindowSize(400, 300);
glutInitWindowPosition(100, 100);
glutInitDisplayMode(GLUT_RGB);
glutCreateWindow("First Game");
glutReshapeFunc(Reshape);
glutDisplayFunc(Draw);
glClearColor(0, 0, 0, 0);
glutMainLoop();
return 0;
}
Mostly accenting ItzWarty’s comment: glutMainLoop
Essentially it’s how your GLUT application is able to process events.