diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-11-20 22:39:52 +0100 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2018-08-27 14:07:40 -0700 |
commit | 1e454642c8bc99698d25105fe0034916e2930fe6 (patch) | |
tree | 3d9b60c1366033c97dfe51d4285d6bf3edf992ed /platform/glfw | |
parent | fd1ed8ce48fc9eaf6793e852381d8c7e648386af (diff) | |
download | qtlocation-mapboxgl-1e454642c8bc99698d25105fe0034916e2930fe6.tar.gz |
[build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL for GLFW
Diffstat (limited to 'platform/glfw')
-rw-r--r-- | platform/glfw/glfw_view.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/platform/glfw/glfw_view.cpp b/platform/glfw/glfw_view.cpp index f1cbdbbaeb..9179113139 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -54,13 +54,19 @@ GLFWView::GLFWView(bool fullscreen_, bool benchmark_) height = videoMode->height; } +#if __APPLE__ glfwWindowHint(GLFW_COCOA_GRAPHICS_SWITCHING, GL_TRUE); +#endif + +#if MBGL_WITH_EGL + glfwWindowHint(GLFW_CONTEXT_CREATION_API, GLFW_EGL_CONTEXT_API); +#endif #ifdef DEBUG glfwWindowHint(GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE); #endif -#ifdef GL_ES_VERSION_2_0 +#if MBGL_USE_GLES2 glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 2); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); @@ -652,7 +658,7 @@ void GLFWView::toggle3DExtrusions(bool visible) { namespace mbgl { namespace platform { -#ifndef GL_ES_VERSION_2_0 +#ifndef MBGL_USE_GLES2 void showDebugImage(std::string name, const char *data, size_t width, size_t height) { glfwInit(); |