You need at least Mac OS X Lion (OS X 10.7 or higher) for the basic support of OpenGL 3.2. To use the OpenGL 3.2 Core Profile, just add
glutInitDisplayMode(GLUT_3_2_CORE_PROFILE | ... | ...);
in your main
-function. You can check it by
std::printf("%s
%s
",
glGetString(GL_RENDERER), // e.g. Intel HD Graphics 3000 OpenGL Engine
glGetString(GL_VERSION) // e.g. 3.2 INTEL-8.0.61
);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…