diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-07-01 16:48:43 +0200 |
---|---|---|
committer | Ivo van Dongen <info@ivovandongen.nl> | 2016-07-07 10:08:45 +0200 |
commit | 353061b8641f35b99c5ba1ef17961fb93872a6b9 (patch) | |
tree | 51a35ac5a3e6790c3763a3c3472e8e93bb2b2753 | |
parent | 868bd7e3a77ddef1387795c29e6cee275362e63b (diff) | |
download | qtlocation-mapboxgl-353061b8641f35b99c5ba1ef17961fb93872a6b9.tar.gz |
[android] #5456 - headless view for egl - incomplete
-rw-r--r-- | include/mbgl/platform/default/headless_view.hpp | 9 | ||||
-rw-r--r-- | mbgl.gypi | 8 | ||||
-rw-r--r-- | platform/android/platform.gyp | 2 |
3 files changed, 18 insertions, 1 deletions
diff --git a/include/mbgl/platform/default/headless_view.hpp b/include/mbgl/platform/default/headless_view.hpp index e3acc8e379..b8b91213c2 100644 --- a/include/mbgl/platform/default/headless_view.hpp +++ b/include/mbgl/platform/default/headless_view.hpp @@ -7,6 +7,9 @@ #else #define MBGL_USE_CGL 1 #endif +#elif __ANDROID__ +#include <EGL/egl.h> +#define MBGL_USE_EGL 1 #else #define GL_GLEXT_PROTOTYPES #define MBGL_USE_GLX 1 @@ -78,6 +81,12 @@ private: GLXPbuffer glxPbuffer = 0; #endif +#if MBGL_USE_EGL + EGLDisplay glDisplay = EGL_NO_DISPLAY; + EGLSurface glSurface = EGL_NO_SURFACE; + EGLContext glContext = EGL_NO_CONTEXT; +#endif + GLuint fbo = 0; GLuint fboDepthStencil = 0; GLuint fboColor = 0; @@ -259,6 +259,14 @@ }, }], + ['headless_lib == "egl"', { + 'sources': [ + 'platform/default/headless_display.cpp', + 'platform/default/headless_view.cpp', + 'platform/android/src/headless_view_egl.cpp', + ], + }], + ['loop_lib == "darwin"', { 'sources': [ 'platform/darwin/src/async_task.cpp', diff --git a/platform/android/platform.gyp b/platform/android/platform.gyp index 137d9c67fe..4fcf334f0e 100644 --- a/platform/android/platform.gyp +++ b/platform/android/platform.gyp @@ -1,7 +1,7 @@ { 'variables': { 'loop_lib': 'android', - 'headless_lib': 'none', + 'headless_lib': 'egl', 'coverage': 0, }, 'includes': [ |