问题描述
我正在使用以下配置
- Mac OSX v 10.9.1
- 英特尔高清显卡4000 1024 MB.
我的目标是通过FreeGLUT使用OpenGL 3.3,有没有办法实现?
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.
但是此网站 https://developer.apple.com/graphicsimaging/opengl/capabilities/指出HD 4000应该支持4.1.那是仅用于glsl还是有使用FreeGLUT的任何方法?我要使用freeGlut的原因是因为我现在正在上的课程要求分配作业在他们的计算机上进行编译,并且他们正在使用FreeGlut,所以我希望能够在家工作.
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.
推荐答案
仅当您请求 core 上下文时,MacOS X才支持OpenGL-3.2和更高版本的上下文.您还必须使用
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);
在 https://stackoverflow.com/a/13751079/524368
这篇关于带有FreeGLUT的OSX上的OpenGL 3.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!