Big hole in using OpenGL on Mac OS

Be free and at leisure started to research OpenGL, went to buy the Little Red Book 8 edition, the content of the book is based on Windows, and Mac can use the version is very low, OpenGL is up to 4.1, GLSL is 1.2 for me.
When we ran the first demo, we had a problem. The book used a FreeGLUT (a third-party library that can be used across platforms), and a FreeGLUT library on the Mac would not be able to compile the shader, so there were two ways to solve it
1: Use your own #include <; GLUT/GLUT.h> Instead of, and in glutInitDisplayMode (GLUT_RGBA | GLUT_3_2_CORE_PROFILE); Adds the specified version to 2. Use another third-party library, GLFW, to set the version number, which can be cross-platform


Read More: