]> git.tdb.fi Git - libs/gl.git/blobdiff - source/extension.cpp
Final touches of OS X support
[libs/gl.git] / source / extension.cpp
index d4acedaf1213ac55817b6d30715db1b7364c95d1..56f96d4ecee2136dcde2d42f5fbdfa7bbf8b421b 100644 (file)
@@ -1,5 +1,5 @@
 #include <set>
-#ifndef WIN32
+#if !defined(WIN32) && !defined(__APPLE__)
 #define GLX_GLXEXT_PROTOTYPES
 #include <GL/glx.h>
 #endif
@@ -92,10 +92,13 @@ bool is_version_at_least(unsigned a, unsigned b)
 
 ExtFunc *get_proc_address(const string &name)
 {
-#ifndef WIN32
-       return glXGetProcAddressARB(reinterpret_cast<const unsigned char *>(name.c_str()));
-#else
+#if defined(WIN32)
        return reinterpret_cast<ExtFunc *>(wglGetProcAddress(name.c_str()));
+#elif defined(__APPLE__)
+       (void)name;
+       return 0;  // Not supported
+#else
+       return glXGetProcAddressARB(reinterpret_cast<const unsigned char *>(name.c_str()));
 #endif
 }