]> git.tdb.fi Git - libs/gl.git/blobdiff - source/gl.h
Get function pointers on OS X through weak symbols
[libs/gl.git] / source / gl.h
index 2c77d6809456e8a8ba65276359e16c4943ab1ff3..255242bf12956fb0559730cd8d8885fdd5813c71 100644 (file)
@@ -4,7 +4,14 @@
 #ifdef WIN32
 #include <windows.h>
 #endif
+#ifdef __APPLE__
+#define extern extern __attribute__((weak_import))
+#include <OpenGL/gl.h>
+#include <OpenGL/glext.h>
+#undef extern
+#else
 #include <GL/gl.h>
 #include <GL/glext.h>
+#endif
 
 #endif