diff options
author | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-19 17:57:18 +0100 |
---|---|---|
committer | José Fonseca <jose.r.fonseca@gmail.com> | 2011-05-19 17:57:18 +0100 |
commit | 3dabe543b983aaa89ff3a85f790d6e1d60d93732 (patch) | |
tree | f7eb97f2c01684e2e5eb4b3e32a1e44c9d1a3183 /glimports.hpp | |
parent | 2e3fff6025fac330cbf00c8b81766dcbcf6298b5 (diff) |
Determine drawable sizes on MacOSX.
Not sure it works correctly on Cocoa apps.
Diffstat (limited to 'glimports.hpp')
-rw-r--r-- | glimports.hpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/glimports.hpp b/glimports.hpp index 720e48a..5cb276d 100644 --- a/glimports.hpp +++ b/glimports.hpp @@ -30,7 +30,8 @@ #ifndef _GLIMPORTS_HPP_ #define _GLIMPORTS_HPP_ -#ifdef _WIN32 + +#if defined(_WIN32) #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 @@ -38,12 +39,15 @@ #include <windows.h> -#else /* !_WIN32 */ +#elif defined(__APPLE__) + +#else #include <X11/Xlib.h> #endif /* !_WIN32 */ + // Prevent including system's glext.h #define __glext_h_ @@ -57,7 +61,8 @@ #define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED #endif -#ifdef _WIN32 + +#if defined(_WIN32) #include "glext/wglext.h" @@ -83,7 +88,11 @@ typedef struct _WGLSWAP #endif /* !WGL_SWAPMULTIPLE_MAX */ -#else /* !_WIN32 */ +#elif defined(__APPLE__) + +#include <OpenGL/OpenGL.h> + +#else #include <GL/glx.h> #include "glext/glxext.h" @@ -91,12 +100,7 @@ typedef struct _WGLSWAP /* Prevent collision with Trace::Bool */ #undef Bool -#endif /* !_WIN32 */ - -#ifdef __APPLE__ - -#include <OpenGL/CGLCurrent.h> +#endif -#endif /* __APPLE__ */ #endif /* _GLIMPORTS_HPP_ */ |