首页 文章

OSX上使用FreeGLUT的OpenGL 3.3

提问于
浏览
0

我使用以下配置

  • Mac OSX v 10.9.1

  • 英特尔高清显卡4000 1024 MB .

我的目标是使用FreeGLUT使用OpenGL 3.3,有没有办法实现这一点?

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.

然而,这个网站https://developer.apple.com/graphicsimaging/opengl/capabilities/指出HD 4000应该支持4.1 . 那仅适用于glsl还是有任何方法可以使用FreeGLUT?我想使用freeGlut的原因是因为我现在正在学习的课程需要在他们的计算机上编译作业,他们正在使用FreeGlut,我希望能够在家工作 .

1 回答

  • 2

    仅当您请求核心上下文时,MacOS X才支持OpenGL-3.2及更高版本的上下文 . 你必须初始化FreeGLUT

    glutInitContextVersion(3,2); /* or later versions, core was introduced only with 3.2 */
    glutInitContextProfile(GLUT_CORE_PROFILE);
    

    另一个解决方案是https://stackoverflow.com/a/13751079/524368

相关问题