PIGE
    Home
    .plan
    FAQ
    .log
Compiling
    Linux/UNIX
    Mac OS 8 & 9
    Mac OS X
    Windows
Downloads
    Source Code
    Executable Demos
    Thesis
Screenshots
    Crate
    Room
Tutorials
    Collision Detection
    Creating Icons
    OpenAL
    A*
Resources
    OpenGL
    OpenAL
    Game Dev
    Books
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!

Last modified: 14. October 2002