OpenGL Programming/Installation/Mac

< OpenGL Programming < Installation

In Mac OS X 10.4 (and most likely all versions of OS X) OpenGL and GLUT are installed with the Xcode/developer tools that came on your Mac OS X installation disc(s).


To use GLUT and OpenGL from within Xcode:

When #including OpenGL & GLUT header files (but not the regular ones like iostream) within Xcode, make sure to do so like this:

#include <OpenGL/gl.h>
#include <OpenGl/glu.h>
#include <GLUT/glut.h>

in other words:

#include <name_of_framework/name_of_header_file.h>

This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.