diff options
author | Mike Morris <michael.patrick.morris@gmail.com> | 2014-10-06 16:53:57 -0400 |
---|---|---|
committer | Mike Morris <michael.patrick.morris@gmail.com> | 2014-10-06 16:53:57 -0400 |
commit | 8b06b65f35445a1dc8490ede523a23fab46529fa (patch) | |
tree | 144a532deb7f2f26625e65f620a2a22c32e6a1f2 /common | |
parent | 170ce422ceb20126cd7dc7b184b5edbc0685c7e7 (diff) | |
download | qtlocation-mapboxgl-8b06b65f35445a1dc8490ede523a23fab46529fa.tar.gz |
wrap GL/glx.h with undef None, use 0 instead, h/t @jfirebaugh
Diffstat (limited to 'common')
-rw-r--r-- | common/glx.h | 2 | ||||
-rw-r--r-- | common/headless_display.cpp | 2 | ||||
-rw-r--r-- | common/headless_view.cpp | 2 | ||||
-rw-r--r-- | common/headless_view.hpp | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/common/glx.h b/common/glx.h new file mode 100644 index 0000000000..6b7d9a3df9 --- /dev/null +++ b/common/glx.h @@ -0,0 +1,2 @@ +#include <GL/glx.h> +#undef None diff --git a/common/headless_display.cpp b/common/headless_display.cpp index 38d123034b..b183b0a501 100644 --- a/common/headless_display.cpp +++ b/common/headless_display.cpp @@ -39,7 +39,7 @@ HeadlessDisplay::HeadlessDisplay() { GLX_ALPHA_SIZE, 8, GLX_DEPTH_SIZE, 24, GLX_STENCIL_SIZE, 8, - None + 0 }; x_info = glXChooseVisual(x_display, DefaultScreen(x_display), pixelFormat); diff --git a/common/headless_view.cpp b/common/headless_view.cpp index 86fa445fc8..cd8ee685d5 100644 --- a/common/headless_view.cpp +++ b/common/headless_view.cpp @@ -171,7 +171,7 @@ void HeadlessView::make_inactive() { #endif #if MBGL_USE_GLX - if (!glXMakeCurrent(x_display, None, NULL)) { + if (!glXMakeCurrent(x_display, 0, NULL)) { fprintf(stderr, "Removing OpenGL context failed\n"); } #endif diff --git a/common/headless_view.hpp b/common/headless_view.hpp index 381988ae94..cef4213e90 100644 --- a/common/headless_view.hpp +++ b/common/headless_view.hpp @@ -4,7 +4,7 @@ #ifdef __APPLE__ #define MBGL_USE_CGL 1 #else -#include <GL/glx.h> +#include "glx.h" #define MBGL_USE_GLX 1 #endif |