From 06d66090532470b2a769e80e760559d572657c28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 9 Oct 2011 17:05:58 +0100 Subject: [PATCH] Fix MacOSX build. --- glws_glx.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) 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); -- 2.7.4