]> git.cworth.org Git - apitrace/blobdiff - dispatch/glimports.hpp
glimports: Check for iOS and skip OpenGL and CGL as appropriate.
[apitrace] / dispatch / glimports.hpp
index e6d1d324f7f3649dcef6abd64140eaf83bcd41dd..9a71a448e084d1f9ff963c3634c0bd23a710adcb 100644 (file)
@@ -88,9 +88,27 @@ typedef struct _WGLSWAP
 
 #elif defined(__APPLE__)
 
+#include <TargetConditionals.h>
+
+#if TARGET_OS_IPHONE
+#elif TARGET_OS_MAC
 #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
@@ -110,6 +128,7 @@ CGLError CGLGetSurface(CGLContextObj ctx, CGSConnectionID* cid, CGSWindowID* wid
 CGLError CGLUpdateContext(CGLContextObj ctx);
 
 }
+#endif
 
 #else