summaryrefslogtreecommitdiff
path: root/platform/darwin
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2017-11-20 22:39:52 +0100
committerJohn Firebaugh <john.firebaugh@gmail.com>2018-08-27 14:07:40 -0700
commit1e454642c8bc99698d25105fe0034916e2930fe6 (patch)
tree3d9b60c1366033c97dfe51d4285d6bf3edf992ed /platform/darwin
parentfd1ed8ce48fc9eaf6793e852381d8c7e648386af (diff)
downloadqtlocation-mapboxgl-1e454642c8bc99698d25105fe0034916e2930fe6.tar.gz
[build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL for GLFW
Diffstat (limited to 'platform/darwin')
-rw-r--r--platform/darwin/mbgl/gl/gl_impl.hpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/platform/darwin/mbgl/gl/gl_impl.hpp b/platform/darwin/mbgl/gl/gl_impl.hpp
index b4c062a474..0db125c7b4 100644
--- a/platform/darwin/mbgl/gl/gl_impl.hpp
+++ b/platform/darwin/mbgl/gl/gl_impl.hpp
@@ -8,9 +8,15 @@
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#elif TARGET_OS_MAC
- #include <OpenGL/OpenGL.h>
- #include <OpenGL/gl.h>
- #include <OpenGL/glext.h>
+ #if MBGL_USE_GLES2
+ #define GL_GLEXT_PROTOTYPES
+ #include <GLES2/gl2.h>
+ #include <GLES2/gl2ext.h>
+ #else
+ #include <OpenGL/OpenGL.h>
+ #include <OpenGL/gl.h>
+ #include <OpenGL/glext.h>
+ #endif
#else
#error Unsupported Apple platform
#endif