diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-10-20 10:47:24 -0700 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2015-10-22 16:02:39 -0700 |
commit | 5fa144647d83316a20e861c08fd5b6179312ad08 (patch) | |
tree | 1c27221ee02e1f9fb257e3998e52c6c9e898d472 /src/mbgl/map/map_data.hpp | |
parent | 7a51a53cac2bb283eb82a5f7835adaa05bbc7b1e (diff) | |
download | qtlocation-mapboxgl-5fa144647d83316a20e861c08fd5b6179312ad08.tar.gz |
[core] Added GLContextMode to MapData
Adding new mbgl::GLContextMode enum to mbgl::Map ctor, which gets stored
in MapData. In shared GL context environments, we cannot assume that the
GL state that has been left since the last draw is the same, so we reset
the GL configurations to their default values.
Diffstat (limited to 'src/mbgl/map/map_data.hpp')
-rw-r--r-- | src/mbgl/map/map_data.hpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mbgl/map/map_data.hpp b/src/mbgl/map/map_data.hpp index 0a3718d87a..c1898fc37f 100644 --- a/src/mbgl/map/map_data.hpp +++ b/src/mbgl/map/map_data.hpp @@ -20,8 +20,9 @@ class MapData { using Lock = std::lock_guard<std::mutex>; public: - inline MapData(MapMode mode_, const float pixelRatio_) + inline MapData(MapMode mode_, GLContextMode contextMode_, const float pixelRatio_) : mode(mode_) + , contextMode(contextMode_) , pixelRatio(pixelRatio_) , animationTime(Duration::zero()) , defaultFadeDuration(mode_ == MapMode::Continuous ? std::chrono::milliseconds(300) : Duration::zero()) @@ -125,6 +126,7 @@ public: public: const MapMode mode; + const GLContextMode contextMode; const float pixelRatio; private: |