X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glimports.hpp;h=65b0aca1f2977e9ca534830d8eac982918080dec;hb=46d058aee0bbd5934ebd882fba556fdeb8de383d;hp=caa3a4e9c20ac2c6d1362b219ac0de8d39c4497e;hpb=3597b0bcc3b59488338eb98f458ec3b2e46de6d6;p=apitrace diff --git a/glimports.hpp b/glimports.hpp index caa3a4e..65b0aca 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -34,13 +34,19 @@ // Prevent including system's glext.h #define __glext_h_ + // Some functions take GLenum disguised as GLint. Apple noticed and fixed it // in the Mac OS X 10.6.x gl.h headers. Regardless, C++ typechecking rules // force the wrappers to match the prototype precisely. -#if defined(__APPLE__) && !defined(MAC_OS_X_VERSION_10_7) -#define GLenum_int GLenum +#if defined(__APPLE__) +# include // for MAC_OS_X_VERSION_10_7 +# if defined(MAC_OS_X_VERSION_10_7) +# define GLenum_int GLint +# else +# define GLenum_int GLenum +# endif #else -#define GLenum_int GLint +# define GLenum_int GLint #endif @@ -107,6 +113,12 @@ typedef struct _WGLSWAP #include #include +#ifndef CGL_VERSION_1_3 +#define kCGLPFAOpenGLProfile 99 +#define kCGLOGLPVersion_Legacy 0x1000 +#define kCGLOGLPVersion_3_2_Core 0x3200 +#endif + extern "C" { // From http://www.opensource.apple.com/source/gdb/gdb-954/libcheckpoint/cpcg.c @@ -125,10 +137,13 @@ CGLError CGLUpdateContext(CGLContextObj ctx); #include #include "glext/glxext.h" -/* Prevent collision with Trace::Bool */ +/* Prevent collision with trace::Bool */ #undef Bool #endif +#include "eglimports.hpp" + + #endif /* _GLIMPORTS_HPP_ */