Help‎ > ‎Programming‎ > ‎

X-Code OpenGL Glut Tutorial


Open Xcode
Select: File (Top Menu): New Project

Select: Empty Project

Click Next

Give your project a name: graphics

Click Finish

Once your project is open

Select: Project (Top Menu): New Target

Select: Carbon Application

Click Next
Give your target a name: graphics

Click Finish
Close the target info window
You have created the target
Select: Project (Top Menu): Add Frameworks

Hold down the Command (Apple) Button and select the following frameworks:

  • Cocoa.framework
  • GLUT.framework
  • OpenGL.framework
Click Add
Click Add
You have added the Frameworks
Select: Project (Top Menu): Add Files

Hold down the Command (Apple) button again and Select the Files for the First Project starter kit

  • graphics.h
  • graphics1.cpp
Click Add
Check the box:

  • Copy items into destination group's folder
Click Add
Select the graphics1.cpp file

change the line:

  • #include "glut.h"
to:

  • #include <GLUT/glut.h>
Select the graphics.h file

change the line:

  • #include "glut.h"
to:

  • #include <GLUT/glut.h>


Select: Build (Top Menu): Build and Run


PROOF

Jeremy Cox, 2005
http://www.supertechguy.com
Comments