问题
I am using the following configuration
- Mac OSX v 10.9.1
- Intel HD graphics 4000 1024 MB.
My goal is to use OpenGL 3.3 using FreeGLUT, Is there a way to achieve that?
glxinfo gives me:
OpenGL vendor string: Intel Inc.
OpenGL renderer string: Intel HD Graphics 4000 OpenGL Engine
OpenGL version string: 2.1 INTEL-8.18.29
OpenGL shading language version string: 1.20,
and the programs where I try to open a 3.3 context gives me errors.
However this site https://developer.apple.com/graphicsimaging/opengl/capabilities/ states that HD 4000 should support 4.1. Is that only for glsl or is there any way to use FreeGLUT? The reason I want to use freeGlut is because the course I am taking right now requires the assignments to compile on their computers, and they are using FreeGlut, and I would like to be able to work from home.
回答1:
MacOS X supports OpenGL-3.2 and later contexts only if you request a core context. You have to initialize FreeGLUT in addition with
glutInitContextVersion(3,2); /* or later versions, core was introduced only with 3.2 */
glutInitContextProfile(GLUT_CORE_PROFILE);
Another solution is given at https://stackoverflow.com/a/13751079/524368
来源:https://stackoverflow.com/questions/21526662/opengl-3-3-on-osx-with-freeglut