summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorMike Morris <michael.patrick.morris@gmail.com>2015-02-10 14:28:35 -0800
committerMike Morris <michael.patrick.morris@gmail.com>2015-02-10 14:28:35 -0800
commitb864d6960638c82e8c16c63712ca235dd6f96fa6 (patch)
tree4ca4d1571cc07e57fe79d07b1424db50557c5562 /platform
parentc5f35d0d11f329a5da543715c3181578af2b2b13 (diff)
parente8a2c393654a1ebfbc7502432fdd0a43398a0cdf (diff)
downloadqtlocation-mapboxgl-b864d6960638c82e8c16c63712ca235dd6f96fa6.tar.gz
Merge pull request #840 from mapbox/glx-cleanup
forward declare GLX typedefs to limit conflicts from glx.h
Diffstat (limited to 'platform')
-rw-r--r--platform/default/headless_display.cpp6
-rw-r--r--platform/default/headless_view.cpp6
2 files changed, 9 insertions, 3 deletions
diff --git a/platform/default/headless_display.cpp b/platform/default/headless_display.cpp
index 4756c8d2cb..c4535fc1a6 100644
--- a/platform/default/headless_display.cpp
+++ b/platform/default/headless_display.cpp
@@ -3,6 +3,10 @@
#include <cstring>
#include <stdexcept>
+#if MBGL_USE_GLX
+#include <GL/glx.h>
+#endif
+
namespace mbgl {
HeadlessDisplay::HeadlessDisplay() {
@@ -52,7 +56,7 @@ HeadlessDisplay::HeadlessDisplay() {
// We're creating a dummy pbuffer anyway that we're not using.
static int pixelFormat[] = {
GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT,
- 0
+ None
};
int configs = 0;
diff --git a/platform/default/headless_view.cpp b/platform/default/headless_view.cpp
index 9df58f8026..656a774390 100644
--- a/platform/default/headless_view.cpp
+++ b/platform/default/headless_view.cpp
@@ -28,6 +28,8 @@ CGLProc CGLGetProcAddress(const char *proc) {
CFRelease(name);
return symbol;
}
+#elif MBGL_USE_GLX
+#include <GL/glx.h>
#endif
namespace mbgl {
@@ -104,7 +106,7 @@ void HeadlessView::createContext() {
if (!glContext) {
// Try to create a legacy context
- glContext = glXCreateNewContext(xDisplay, fbConfigs[0], GLX_RGBA_TYPE, 0, True);
+ glContext = glXCreateNewContext(xDisplay, fbConfigs[0], GLX_RGBA_TYPE, None, True);
if (glContext) {
if (!glXIsDirect(xDisplay, glContext)) {
mbgl::Log::Error(mbgl::Event::OpenGL, "Failed to create direct OpenGL Legacy context");
@@ -123,7 +125,7 @@ void HeadlessView::createContext() {
int pbufferAttributes[] = {
GLX_PBUFFER_WIDTH, 8,
GLX_PBUFFER_HEIGHT, 8,
- 0
+ None
};
glxPbuffer = glXCreatePbuffer(xDisplay, fbConfigs[0], pbufferAttributes);
#endif