]> git.cworth.org Git - apitrace/commitdiff
Support for Mac OS X 10.5 Leopard
authorNigel Stewart <nigels@users.sourceforge.net>
Fri, 5 Jul 2013 16:49:11 +0000 (11:49 -0500)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 8 Jul 2013 16:59:41 +0000 (17:59 +0100)
CGLShareGroupObj and IOSurfaceRef were added in 10.6 Snow Leopard SDK
Add workarounds to glimports.hpp to support building for pre-10.6.

dispatch/glimports.hpp

index e6d1d324f7f3649dcef6abd64140eaf83bcd41dd..358135f2ba86f62b444cedfa6ffb79e1fd0061d5 100644 (file)
@@ -89,8 +89,22 @@ typedef struct _WGLSWAP
 #elif defined(__APPLE__)
 
 #include <OpenGL/OpenGL.h>
+
+#include <AvailabilityMacros.h>
+
+#ifndef MAC_OS_X_VERSION_10_6
+#define MAC_OS_X_VERSION_10_6 1060
+#endif
+
+#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_6
 #include <OpenGL/CGLIOSurface.h>
 #include <OpenGL/CGLDevice.h>
+#else
+#define kCGLPFAAcceleratedCompute 97
+#define kCGLRPAcceleratedCompute 130
+typedef void *CGLShareGroupObj;
+typedef struct __IOSurface *IOSurfaceRef;
+#endif
 
 #ifndef CGL_VERSION_1_3
 #define kCGLPFAOpenGLProfile 99