OPENGL MAC OS X

本文介绍在 MacOSX 上使用 OpenGL 进行编程的基本步骤。与早期 MacOS 版本相比,在 MacOSX 中设置 OpenGL 程序变得更加简单直接。文章详细说明了如何通过 Project Builder 创建 C++ 项目,并添加必要的 OpenGL 和 GLUT 框架。

http://www.edenwaith.com/products/pige/compiling/osx.php

 

Compiling : Mac OS X Engine


Compiling and setting up OpenGL programs in pre OS X versions of Mac OS was never a fun and easy little task, but with OS X, setting up OpenGL programs has become easier than any other platform available. In the fashion of Apple's guides of simplicity, the steps to set up OpenGL are very few compared to other platforms. This is likely because OpenGL is an integral part of OS X, so it makes sense that all of the proper libraries and functions would already be built into the OS. No more downloading large GLUT files! 
  1. Open up Project Builder.
  2. Go to File -> New Project. Scroll down near the bottom and select C++ Tool. This will create a fairly straight-forward C++ program without all the extra material which is added with Carbon or Cocoa projects.
  3. Name the project whatever you want.
  4. Go to Project -> Add Frameworks and add the GLUT.framework. If you are using Mac OS 10.1, you also need to include the Foundation and OpenGL frameworks, too. I haven't tested this under OS 10.2 yet.
  5. Add your OpenGL program (overwriting the default main.cpp program).
  6. If your OpenGL program has the include library <GL/glut.h>, change this to <GLUT/glut.h> for Mac OS X. If you are including <gl.h> and/or <glu.h>, you'll need to change them to <OpenGL/gl.h> and/or <OpenGL/glu.h>
  7. That's it!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值