X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=glimports.hpp;h=7207523fdfa65c3018301a3598ab50b5d714931b;hb=dd68940bb65e1224832dec1087c922e62c654ca8;hp=caa3a4e9c20ac2c6d1362b219ac0de8d39c4497e;hpb=3597b0bcc3b59488338eb98f458ec3b2e46de6d6;p=apitrace diff --git a/glimports.hpp b/glimports.hpp index caa3a4e..7207523 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 @@ -59,7 +65,10 @@ #else +#ifdef HAVE_X11 #include +#endif + #include #endif /* !_WIN32 */ @@ -107,6 +116,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 @@ -122,13 +137,18 @@ CGLError CGLUpdateContext(CGLContextObj ctx); #else +#ifdef HAVE_X11 #include #include "glext/glxext.h" +#endif -/* Prevent collision with Trace::Bool */ +/* Prevent collision with trace::Bool */ #undef Bool #endif +#include "eglimports.hpp" + + #endif /* _GLIMPORTS_HPP_ */