From: José Fonseca Date: Sun, 9 Oct 2011 16:05:58 +0000 (+0100) Subject: Fix MacOSX build. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=06d66090532470b2a769e80e760559d572657c28;p=apitrace Fix MacOSX build. --- diff --git a/glws_glx.cpp b/glws_glx.cpp index 23b4082..c082417 100644 --- a/glws_glx.cpp +++ b/glws_glx.cpp @@ -29,7 +29,14 @@ #include #include "glws.hpp" + +#ifdef __APPLE__ +#include +#include +#include +#else #include "glproc.hpp" +#endif namespace glws { @@ -297,7 +304,7 @@ createContext(const Visual *_visual, Context *shareContext) share_context = dynamic_cast(shareContext)->context; } - +#ifndef __APPLE__ if (glxVersion >= 0x0104 && has_GLX_ARB_create_context) { Attributes attribs; attribs.add(GLX_RENDER_TYPE, GLX_RGBA_TYPE); @@ -307,7 +314,9 @@ createContext(const Visual *_visual, Context *shareContext) attribs.end(); context = glXCreateContextAttribsARB(display, visual->fbconfig, share_context, True, attribs); - } else if (glxVersion >= 0x103) { + } else +#endif + if (glxVersion >= 0x103) { context = glXCreateNewContext(display, visual->fbconfig, GLX_RGBA_TYPE, share_context, True); } else { context = glXCreateContext(display, visual->visinfo, share_context, True);