Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
[android] #5456 - headless view for egl - incomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
ivovandongen committed Jul 7, 2016
1 parent 868bd7e commit 353061b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
9 changes: 9 additions & 0 deletions include/mbgl/platform/default/headless_view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -78,6 +81,12 @@ class HeadlessView : public View {
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;
Expand Down
8 changes: 8 additions & 0 deletions mbgl.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion platform/android/platform.gyp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'variables': {
'loop_lib': 'android',
'headless_lib': 'none',
'headless_lib': 'egl',
'coverage': 0,
},
'includes': [
Expand Down

0 comments on commit 353061b

Please sign in to comment.