summaryrefslogtreecommitdiff
path: root/src/mbgl/programs
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-17 15:04:08 +0300
commit073e102b9bf5cad330f3f180018069f2f337f02b (patch)
treecd79b1a0133324ff11640e1b7f00211d146f7d00 /src/mbgl/programs
parent32376115c35567be9f0bfe4c9f7a6b3aef8b4f5b (diff)
downloadqtlocation-mapboxgl-073e102b9bf5cad330f3f180018069f2f337f02b.tar.gz
[core] Add optional sortKey to segment
Diffstat (limited to 'src/mbgl/programs')
-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..13e206aa2a 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,
+ float sortKey_ = 0.0f)
: 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;
+
+ float sortKey;
};
template <class AttributeList>