diff options
author | Ansis Brammanis <brammanis@gmail.com> | 2017-06-21 18:41:27 -0400 |
---|---|---|
committer | Ansis Brammanis <brammanis@gmail.com> | 2017-06-21 18:41:27 -0400 |
commit | a4e13adc66d241d79db578c30cefbdb1cde26c20 (patch) | |
tree | 302ee2468f5f9e939971d8ffb92e6bf8dadcf968 | |
parent | 40c0f734d70fb47af1cf3572546f625d2cb78600 (diff) | |
download | qtlocation-mapboxgl-a4e13adc66d241d79db578c30cefbdb1cde26c20.tar.gz |
remove unused buffer attributes
-rw-r--r-- | src/mbgl/layout/symbol_layout.cpp | 12 | ||||
-rw-r--r-- | src/mbgl/programs/symbol_program.hpp | 16 |
2 files changed, 7 insertions, 21 deletions
diff --git a/src/mbgl/layout/symbol_layout.cpp b/src/mbgl/layout/symbol_layout.cpp index 9bc1f65226..6e55c99497 100644 --- a/src/mbgl/layout/symbol_layout.cpp +++ b/src/mbgl/layout/symbol_layout.cpp @@ -594,14 +594,10 @@ void SymbolLayout::addSymbol(Buffer& buffer, uint8_t glyphAngle = std::round((symbol.glyphAngle / (M_PI * 2)) * 256); // coordinates (2 triangles) - buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, tl, labelAnchor, tex.x, tex.y, - minZoom, maxZoom, placementZoom, glyphAngle)); - buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, tr, labelAnchor, tex.x + tex.w, tex.y, - minZoom, maxZoom, placementZoom, glyphAngle)); - buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, bl, labelAnchor, tex.x, tex.y + tex.h, - minZoom, maxZoom, placementZoom, glyphAngle)); - buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, br, labelAnchor, tex.x + tex.w, tex.y + tex.h, - minZoom, maxZoom, placementZoom, glyphAngle)); + buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, tl, labelAnchor, tex.x, tex.y)); + buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, tr, labelAnchor, tex.x + tex.w, tex.y)); + buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, bl, labelAnchor, tex.x, tex.y + tex.h)); + buffer.vertices.emplace_back(SymbolLayoutAttributes::vertex(anchorPoint, br, labelAnchor, tex.x + tex.w, tex.y + tex.h)); auto dynamicVertex = SymbolDynamicLayoutAttributes::vertex(anchorPoint, 0, placementZoom); buffer.dynamicVertices.emplace_back(dynamicVertex); diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 04bbd3bb1d..8d4f132b70 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -56,11 +56,7 @@ struct SymbolLayoutAttributes : gl::Attributes< Point<float> o, Point<float> labelAnchor, uint16_t tx, - uint16_t ty, - float minzoom, - float maxzoom, - float labelminzoom, - uint8_t labelangle) { + uint16_t ty) { return Vertex { // combining pos and offset to reduce number of vertex attributes passed to shader (8 max for some devices) {{ @@ -76,14 +72,8 @@ struct SymbolLayoutAttributes : gl::Attributes< {{ tx, ty, - mbgl::attributes::packUint8Pair( - static_cast<uint8_t>(labelminzoom * 10), // 1/10 zoom levels: z16 == 160 - static_cast<uint8_t>(labelangle) - ), - mbgl::attributes::packUint8Pair( - static_cast<uint8_t>(minzoom * 10), - static_cast<uint8_t>(::fmin(maxzoom, 25) * 10) - ) + 0, + 0 }} }; } |