Running the Program

After all the setup is completed, GLUT programs enter an event-processing loop, glutMainLoop().

Note

For those of you familiar with previous versions of GLUT (regardless of whether it’s the Freeglut version or the original), various features—like menus and shapes, for example—will not work when you ask for a core profile, as they use deprecated features. If you need those features, the simplest approach is to ask for a compatibility profile.

Get OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3, Eighth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.