Is it possible to use GLUT on OS X Lion or OS X Mountain Lion using core profile (so I can use GLSL 1.50)?
是否可以使用core profile(这样我就可以使用GLSL 1.50)对OS X Lion或OS X Mountain Lion使用供过于求?
Can I use the built in GLUT or do I need to use a third-part library such as FreeGLUT?
我可以使用内置的吗?还是需要使用第三方的库,比如FreeGLUT?
And is there any simple 'Hello world' applications available for OS X with either an XCode project or a make-file?
OS X有什么简单的“Hello world”应用程序可以用XCode项目或make文件实现吗?
3 个解决方案
#1
16
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
至少需要Mac OS X Lion (OS X 10.7或更高)来支持OpenGL 3.2。要使用OpenGL 3.2核心概要文件,只需添加
glutInitDisplayMode(GLUT_3_2_CORE_PROFILE | ... | ...);
in your main
-function. You can check it by
你的主要功能。你可以查一下。
std::printf("%s\n%s\n",
glGetString(GL_RENDERER), // e.g. Intel HD Graphics 3000 OpenGL Engine
glGetString(GL_VERSION) // e.g. 3.2 INTEL-8.0.61
);
#2
0
GLUT does not support OpenGL 3.2, as it provides no functionality to specify the desired OpenGL context version. Also, GLUT's functionality relies on APIs that are not available with the OpenGL 3.2 Core Profile.
供应过剩不支持OpenGL 3.2,因为它不提供指定所需的OpenGL上下文版本的功能。此外,供过于求的功能依赖于OpenGL 3.2核心概要文件中没有的api。
You have to switch to FreeGLUT or GLFW.
你必须切换到FreeGLUT或GLFW。
#3
0
flyx is wrong, OpenGL 3.2 is the version that added core and compatibility profiles (not 3.3). However, Apple just doesn't support compatibility profiles at all (no reason, they just don't). GLUT comes in xcode as a framework and you can use it that way. So you can do it in a completely non-standard, platform specific way.
flyx是错误的,OpenGL 3.2是添加核心和兼容性配置文件的版本(不是3.3)。然而,苹果根本不支持兼容性配置文件(没有理由,他们只是不支持)。过剩作为一个框架出现在xcode中,您可以这样使用它。所以你可以用一种完全不标准的,特定于平台的方式来做。
#1
16
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
至少需要Mac OS X Lion (OS X 10.7或更高)来支持OpenGL 3.2。要使用OpenGL 3.2核心概要文件,只需添加
glutInitDisplayMode(GLUT_3_2_CORE_PROFILE | ... | ...);
in your main
-function. You can check it by
你的主要功能。你可以查一下。
std::printf("%s\n%s\n",
glGetString(GL_RENDERER), // e.g. Intel HD Graphics 3000 OpenGL Engine
glGetString(GL_VERSION) // e.g. 3.2 INTEL-8.0.61
);
#2
0
GLUT does not support OpenGL 3.2, as it provides no functionality to specify the desired OpenGL context version. Also, GLUT's functionality relies on APIs that are not available with the OpenGL 3.2 Core Profile.
供应过剩不支持OpenGL 3.2,因为它不提供指定所需的OpenGL上下文版本的功能。此外,供过于求的功能依赖于OpenGL 3.2核心概要文件中没有的api。
You have to switch to FreeGLUT or GLFW.
你必须切换到FreeGLUT或GLFW。
#3
0
flyx is wrong, OpenGL 3.2 is the version that added core and compatibility profiles (not 3.3). However, Apple just doesn't support compatibility profiles at all (no reason, they just don't). GLUT comes in xcode as a framework and you can use it that way. So you can do it in a completely non-standard, platform specific way.
flyx是错误的,OpenGL 3.2是添加核心和兼容性配置文件的版本(不是3.3)。然而,苹果根本不支持兼容性配置文件(没有理由,他们只是不支持)。过剩作为一个框架出现在xcode中,您可以这样使用它。所以你可以用一种完全不标准的,特定于平台的方式来做。