diff options
author | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-04-09 11:37:43 +0300 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2019-04-17 11:36:52 +0300 |
commit | 71876211732a0472372f54a2a31194746ead2437 (patch) | |
tree | 7a4bd3c420909b009d0b46558a3acbc23476fa99 | |
parent | c42cb2677b86e61860407be8df4090eeeb2c2534 (diff) | |
download | qtlocation-mapboxgl-71876211732a0472372f54a2a31194746ead2437.tar.gz |
[core] Add optional sortKey to segment
-rw-r--r-- | src/mbgl/programs/segment.hpp | 8 |
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> |