How To Run Glut And Opengl On Xcode

To run glut and openGL on Xcode follow these steps:

  • Open Xcode > 'Create a new Xcode project' .
  • Navigate to 'macOS' tab and select 'Command Line Tool' > Click ' Next' .
  • Fill your project name and other details > Select 'C++' as language > 'Next' .
  • Choose the project Location .
  • Click on your project name (at the top left corner).
  • Navigate to build Phases > Click add button '+'. Now  one search window will pop up.
  • Search and add 'OpenGL.framework' and 'GLUT.framework'.
  • Now click on the main.cpp file and add this line (header file adding) >

#include <GLUT/glut.h>

Sample code available here.


Now you can start programming on GLUT and openGL :)

Comments

Popular posts from this blog

How To Configure Mail Client From "mobileconfig" File ( iOS )