带有OpenGL 3.2核心配置文件的OS X上的GLUT [英] GLUT on OS X with OpenGL 3.2 Core Profile

查看:103
本文介绍了带有OpenGL 3.2核心配置文件的OS X上的GLUT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以使用核心配置文件在OS X Lion或OS X Mountain Lion上使用GLUT(因此我可以使用GLSL 1.50)?

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)?

我可以使用内置的GLUT还是需要使用FreeGLUT之类的第三方库?

Can I use the built in GLUT or do I need to use a third-part library such as FreeGLUT?

在OS X上是否有任何简单的"Hello world"应用程序带有XCode项目或生成文件?

And is there any simple 'Hello world' applications available for OS X with either an XCode project or a make-file?

推荐答案

您至少需要Mac OS X Lion(OS X 10.7或更高版本)才能基本支持OpenGL 3.2.要使用OpenGL 3.2核心配置文件,只需添加

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 | ... | ...);

main功能中的

.您可以通过

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
        );

这篇关于带有OpenGL 3.2核心配置文件的OS X上的GLUT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆