summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Shalamov <alexander.shalamov@mapbox.com>2019-04-09 11:37:43 +0300
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2019-04-11 15:13:38 +0300
commit1606713a487508c9581e0422ca165243b8975931 (patch)
tree81368e81796b5564d998c5a4d88650f4c416f076
parent6012481e3b41fc4ae94faaa44f486e4c43c0fcbd (diff)
downloadqtlocation-mapboxgl-1606713a487508c9581e0422ca165243b8975931.tar.gz
[core] Add optional sortKey to segment
-rw-r--r--src/mbgl/programs/segment.hpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mbgl/programs/segment.hpp b/src/mbgl/programs/segment.hpp
index 5976550d2c..98628507c2 100644
--- a/src/mbgl/programs/segment.hpp
+++ b/src/mbgl/programs/segment.hpp
@@ -14,11 +14,13 @@ public:
Segment(std::size_t vertexOffset_,
std::size_t indexOffset_,
std::size_t vertexLength_ = 0,
- std::size_t indexLength_ = 0)
+ std::size_t indexLength_ = 0,
+ unsigned int sortKey_ = 0u)
: vertexOffset(vertexOffset_),
indexOffset(indexOffset_),
vertexLength(vertexLength_),
- indexLength(indexLength_) {}
+ indexLength(indexLength_),
+ sortKey(sortKey_) {}
Segment(Segment&&) = default;
@@ -36,6 +38,8 @@ public:
// * when two fill layers have the same layout properties, but one
// uses fill-color and the other uses fill-pattern
mutable std::map<std::string, gfx::DrawScope> drawScopes;
+
+ unsigned int sortKey;
};
template <class AttributeList>