]> 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 c033a377aa7a1bd11ed75294fc3f67ae633b6f49..255242bf12956fb0559730cd8d8885fdd5813c71 100644 (file)
@@ -1,16 +1,17 @@
-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2007  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #ifndef MSP_GL_GL_H_
 #define MSP_GL_GL_H_
 
 #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