reset password
Author Message
venny
Posts: 61
Posted 11:29 Mar 30, 2016 |

After looking around the web, I figured out how to work with OpenGL with the sample code given to us in class.

1) Download and install Xcode.  Two ways to get this:

  1. App store
  2. https://developer.apple.com/downloads/   (I used this way)

2) Open Xcode (may have to verify, which might take a while.)  

3) Click "create new Xcode project"

4: OS X: Applications >> command line tool >> Next

5: Enter information

  • Product Name: <name of project>
  • Organization Name/identifier: <Doesn't matter in this case>
  • Language: C++

6: Click Next

7: Click on your project name in the navigation window then click Build Phases

8: Go to Link Binary with Libraries and click the + sign

9: Search and add GLUT.Framework

10: Search and add OpenGL.Framework

11: Now in your main.cpp you need to change the #includes to:
 

#ifdef WIN32

#include <windows.h>  

#endif

#include <GLUT/glut.h>

#include <OpenGL/gl.h>

#include <OpenGL/glu.h>

 

12: Run it and it SHOULD work

Last edited by venny at 11:30 Mar 30, 2016.
eykang
Posts: 95
Posted 16:03 Mar 30, 2016 |

Good!