diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2017-11-20 22:39:52 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2018-06-11 15:18:32 +0200 |
commit | ea22106feda0e310f1317812306650db10ecec18 (patch) | |
tree | 9d20064b91b1e85e7a9851562bda7fe482827112 /platform/glfw/glfw_view.cpp | |
parent | cdda739facf650dac5267d86b98903c4ba1d02ed (diff) | |
download | qtlocation-mapboxgl-ea22106feda0e310f1317812306650db10ecec18.tar.gz |
[build] allow WITH_EGL for macOS as well (SwiftShader) and enable EGL for GLFW
Diffstat (limited to 'platform/glfw/glfw_view.cpp')
-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 3988419265..068f33f8ee 100644 --- a/platform/glfw/glfw_view.cpp +++ b/platform/glfw/glfw_view.cpp @@ -53,13 +53,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); @@ -660,7 +666,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(); |