#ifndef GLINCLUDES_H
#define GLINCLUDES_H

// TODO: test on mac

#define GL_GLEXT_PROTOTYPES 1
#ifdef __APPLE__
  #include<OpenGL/gl.h>
  #include<OpenGL/glu.h>
  #include<Glut/glut.h>
  //#include<OpenGL/glext.h>
#else
  #include <GL/gl.h>
  #include <GL/glu.h>
  #include <GL/glut.h>
  // is glext really needed?
  //#include <GL/glext.h>
#endif

// GLew might not be needed on mac, or if a recent version of OpenGL is present
//#ifndef __APPLE__
  #ifndef GL_VERSION_2_1
    // OpenGL>=2.1 not found, try GLEW
    #include <GL/glew.h>
    #ifndef GLEW_VERSION_2_1
      #error OpenGL 2.1 or GLEW is required
    #endif
  #endif
//#endif

#endif // GLINCLUDES_H
