Mac OS X header compatibility.
[grGL.git] / src / main.c
index 7825a2dca9d796dbb15712fbd664bbc372a6f990..f658a33b655cc22aa27f6bd4748f3c1aeea77583 100644 (file)
@@ -2,7 +2,16 @@
 // -- norly.
 
 #include <stdlib.h>
+
+#ifdef __APPLE__
+#include <OpenGL/gl.h>
+#include <OpenGL/glu.h>
+#include <GLUT/glut.h>
+#else
+#include <GL/gl.h>
+#include <GL/glu.h>
 #include <GL/glut.h>
+#endif
 
 #include "graph.h"
 #include "glancillary.h"
@@ -55,7 +64,7 @@ void on_reshape(int w, int h)
   // Set up the Projection transformation
   glMatrixMode(GL_PROJECTION);
   glLoadIdentity();
-  gluPerspective(90, (GLfloat)w/(GLfloat)h, 0.0, 5.0);
+  gluPerspective(90, (GLfloat)w/(GLfloat)h, 0.0001, 1000.0);
 
   // Switch to Model/view transformation for drawing objects
   glMatrixMode(GL_MODELVIEW);