Glut and OpenGL setup for Osx Lion 10.7.4
Osx Docs instruction is:
#include <OpenGL/gl.h>
#include <OpenGL/glu.h>
#include <GLUT/glut.h>
you don't need to include gl.h and glu.h, as they are already included in glut.h.
and for build and link Docs instruction is:
cc -framework GLUT -framework OpenGL -framework Cocoa glutapp.c -o glutapp
but I am using g++ we dont need cocoa framework
so this is how it is working in my case
#if defined(__APPLE__)
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
Build:
g++ -framework OpenGL -framework GLUT main.cpp -o testeApp