diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-10-24 16:41:04 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-10-24 16:41:04 +0200 |
commit | d299e580886353e0813d30f9dee74639f899924a (patch) | |
tree | e73137e3258538cb5bbc634d1aff24c22e0f7a0f /platform/default/glfw_view.cpp | |
parent | cd9a89257a0004ca18460befc4b141bc07ed5c22 (diff) | |
parent | cd44abcc588c9fc988589c148e76e4590c2197b8 (diff) | |
download | qtlocation-mapboxgl-d299e580886353e0813d30f9dee74639f899924a.tar.gz |
Merge remote-tracking branch 'origin/headless-display' into gyp-restructuring
Conflicts:
Makefile
ios/mapbox-gl-cocoa
Diffstat (limited to 'platform/default/glfw_view.cpp')
-rw-r--r-- | platform/default/glfw_view.cpp | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/platform/default/glfw_view.cpp b/platform/default/glfw_view.cpp index fed21f7d96..baacfbfd9c 100644 --- a/platform/default/glfw_view.cpp +++ b/platform/default/glfw_view.cpp @@ -2,16 +2,19 @@ #include <mbgl/util/string.hpp> -GLFWView::GLFWView(bool fullscreen) : fullscreen(fullscreen) { +GLFWView::GLFWView(bool fullscreen_) : fullscreen(fullscreen_) { #ifdef NVIDIA glDiscardFramebufferEXT = (PFNGLDISCARDFRAMEBUFFEREXTPROC)glfwGetProcAddress("glDiscardFramebufferEXT"); #endif } -GLFWView::~GLFWView() { glfwTerminate(); } +GLFWView::~GLFWView() { + map->terminate(); + glfwTerminate(); +} -void GLFWView::initialize(mbgl::Map *map) { - View::initialize(map); +void GLFWView::initialize(mbgl::Map *map_) { + View::initialize(map_); if (!glfwInit()) { fprintf(stderr, "Failed to initialize glfw\n"); @@ -194,6 +197,10 @@ void GLFWView::make_active() { glfwMakeContextCurrent(window); } +void GLFWView::make_inactive() { + glfwMakeContextCurrent(nullptr); +} + void GLFWView::notify() { glfwPostEmptyEvent(); } |