summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2015-10-20 10:47:24 -0700
committerBruno de Oliveira Abinader <bruno@mapbox.com>2015-10-22 16:02:39 -0700
commit5fa144647d83316a20e861c08fd5b6179312ad08 (patch)
tree1c27221ee02e1f9fb257e3998e52c6c9e898d472 /include
parent7a51a53cac2bb283eb82a5f7835adaa05bbc7b1e (diff)
downloadqtlocation-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 'include')
-rw-r--r--include/mbgl/map/map.hpp3
-rw-r--r--include/mbgl/map/mode.hpp9
2 files changed, 9 insertions, 3 deletions
diff --git a/include/mbgl/map/map.hpp b/include/mbgl/map/map.hpp
index 9661bcc7bc..65f988b5bf 100644
--- a/include/mbgl/map/map.hpp
+++ b/include/mbgl/map/map.hpp
@@ -44,7 +44,8 @@ class Map : private util::noncopyable {
public:
explicit Map(View&, FileSource&,
- MapMode mode = MapMode::Continuous);
+ MapMode mapMode = MapMode::Continuous,
+ GLContextMode contextMode = GLContextMode::Unique);
~Map();
// Pauses the render thread. The render thread will stop running but will not be terminated and will not lose state until resumed.
diff --git a/include/mbgl/map/mode.hpp b/include/mbgl/map/mode.hpp
index 4ade870d90..3e838dca99 100644
--- a/include/mbgl/map/mode.hpp
+++ b/include/mbgl/map/mode.hpp
@@ -10,6 +10,11 @@ enum class MapMode : uint8_t {
Still, // a once-off still image
};
-}
+enum class GLContextMode : uint8_t {
+ Unique,
+ Shared,
+};
+
+} // namespace mbgl
-#endif \ No newline at end of file
+#endif // MBGL_MAP_MODE