summaryrefslogtreecommitdiff
path: root/pugl/pugl.h
diff options
context:
space:
mode:
Diffstat (limited to 'pugl/pugl.h')
-rw-r--r--pugl/pugl.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/pugl/pugl.h b/pugl/pugl.h
index e5021f3..13f5efa 100644
--- a/pugl/pugl.h
+++ b/pugl/pugl.h
@@ -23,6 +23,22 @@
#include <stdint.h>
+/*
+ This API is pure portable C and contains no platform specific elements, or
+ even a GL dependency. However, unfortunately GL includes vary across
+ platforms so they are included here to allow for pure portable programs.
+*/
+#ifdef __APPLE__
+# include "OpenGL/gl.h"
+# include "OpenGL/glu.h"
+#else
+# ifdef _WIN32
+# include <windows.h> /* Broken Windows GL headers require this */
+# endif
+# include "GL/gl.h"
+# include "GL/glu.h"
+#endif
+
#ifdef __cplusplus
extern "C" {
#else