diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-11-03 01:59:24 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2016-11-11 18:00:15 +0100 |
commit | 19496a0bd91d90b7a1dcc7737990d84c4760e9d7 (patch) | |
tree | e67fcb0775b341975a7686f29310443acace8e3f /include/mbgl | |
parent | ae332dc3a34c6ae77c76521ea68ff1a70bbd3dc5 (diff) | |
download | qtlocation-mapboxgl-19496a0bd91d90b7a1dcc7737990d84c4760e9d7.tar.gz |
[linux] Added OSMesa headless backend
Diffstat (limited to 'include/mbgl')
-rw-r--r-- | include/mbgl/gl/implementation.hpp | 2 | ||||
-rw-r--r-- | include/mbgl/platform/default/headless_backend.hpp | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/mbgl/gl/implementation.hpp b/include/mbgl/gl/implementation.hpp index 4e3a3e51c7..a0101085fa 100644 --- a/include/mbgl/gl/implementation.hpp +++ b/include/mbgl/gl/implementation.hpp @@ -9,6 +9,8 @@ #else #define MBGL_USE_CGL 1 #endif +#elif defined(__OSMESA__) + #define MBGL_USE_OSMESA 1 #else #define MBGL_USE_GLX 1 #endif diff --git a/include/mbgl/platform/default/headless_backend.hpp b/include/mbgl/platform/default/headless_backend.hpp index 2f4886a365..b6c654943f 100644 --- a/include/mbgl/platform/default/headless_backend.hpp +++ b/include/mbgl/platform/default/headless_backend.hpp @@ -12,6 +12,8 @@ typedef struct __GLXcontextRec* GLXContext; typedef struct __GLXFBConfigRec* GLXFBConfig; typedef long unsigned int XID; typedef XID GLXPbuffer; +#elif MBGL_USE_OSMESA +#include <GL/osmesa.h> #endif #include <mbgl/map/backend.hpp> @@ -71,6 +73,11 @@ private: GLXPbuffer glxPbuffer = 0; #endif +#if MBGL_USE_OSMESA + OSMesaContext glContext = nullptr; + GLubyte fakeBuffer = 0; +#endif + std::function<void(MapChange)> mapChangeCallback; }; |