diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-02-28 14:28:58 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-03-01 09:33:37 +0100 |
commit | 95deab32ceadd2bca3912d866e76c6b0f1b931f4 (patch) | |
tree | 09a2178cd034d67370cd9b9bc62312fd45f5af0d /src/mbgl/renderer/buckets | |
parent | 3f1d754369fe0a12f924c3dd47ad028c98b8e3b7 (diff) | |
download | qtlocation-mapboxgl-95deab32ceadd2bca3912d866e76c6b0f1b931f4.tar.gz |
[core] extract attribute structs and gl::Vertex to separate namespace
Diffstat (limited to 'src/mbgl/renderer/buckets')
-rw-r--r-- | src/mbgl/renderer/buckets/circle_bucket.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/circle_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/fill_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/heatmap_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/line_bucket.cpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/line_bucket.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/renderer/buckets/symbol_bucket.hpp | 28 |
8 files changed, 21 insertions, 21 deletions
diff --git a/src/mbgl/renderer/buckets/circle_bucket.cpp b/src/mbgl/renderer/buckets/circle_bucket.cpp index b2d8d8ee98..bf54205978 100644 --- a/src/mbgl/renderer/buckets/circle_bucket.cpp +++ b/src/mbgl/renderer/buckets/circle_bucket.cpp @@ -99,7 +99,7 @@ void CircleBucket::addFeature(const GeometryTileFeature& feature, } template <class Property> -static float get(const RenderCircleLayer& layer, const std::map<std::string, CircleProgram::PaintPropertyBinders>& paintPropertyBinders) { +static float get(const RenderCircleLayer& layer, const std::map<std::string, CircleProgram::Binders>& paintPropertyBinders) { auto it = paintPropertyBinders.find(layer.getID()); if (it == paintPropertyBinders.end() || !it->second.statistics<Property>().max()) { return layer.evaluated.get<Property>().constantOr(Property::defaultValue()); diff --git a/src/mbgl/renderer/buckets/circle_bucket.hpp b/src/mbgl/renderer/buckets/circle_bucket.hpp index dad8b8b377..9082e891e4 100644 --- a/src/mbgl/renderer/buckets/circle_bucket.hpp +++ b/src/mbgl/renderer/buckets/circle_bucket.hpp @@ -37,7 +37,7 @@ public: optional<gl::VertexBuffer<CircleLayoutVertex>> vertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; - std::map<std::string, CircleProgram::PaintPropertyBinders> paintPropertyBinders; + std::map<std::string, CircleProgram::Binders> paintPropertyBinders; const MapMode mode; }; diff --git a/src/mbgl/renderer/buckets/fill_bucket.hpp b/src/mbgl/renderer/buckets/fill_bucket.hpp index 2724e5b7d3..225d4c661d 100644 --- a/src/mbgl/renderer/buckets/fill_bucket.hpp +++ b/src/mbgl/renderer/buckets/fill_bucket.hpp @@ -50,7 +50,7 @@ public: optional<gl::IndexBuffer<gl::Lines>> lineIndexBuffer; optional<gl::IndexBuffer<gl::Triangles>> triangleIndexBuffer; - std::map<std::string, FillProgram::PaintPropertyBinders> paintPropertyBinders; + std::map<std::string, FillProgram::Binders> paintPropertyBinders; }; } // namespace mbgl diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp index 42344c4b8d..486eb221e5 100644 --- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp +++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp @@ -46,7 +46,7 @@ public: optional<gl::VertexBuffer<FillExtrusionLayoutVertex>> vertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; - std::unordered_map<std::string, FillExtrusionProgram::PaintPropertyBinders> paintPropertyBinders; + std::unordered_map<std::string, FillExtrusionProgram::Binders> paintPropertyBinders; }; } // namespace mbgl diff --git a/src/mbgl/renderer/buckets/heatmap_bucket.hpp b/src/mbgl/renderer/buckets/heatmap_bucket.hpp index 9bec9208a8..8948f52acb 100644 --- a/src/mbgl/renderer/buckets/heatmap_bucket.hpp +++ b/src/mbgl/renderer/buckets/heatmap_bucket.hpp @@ -36,7 +36,7 @@ public: optional<gl::VertexBuffer<HeatmapLayoutVertex>> vertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; - std::map<std::string, HeatmapProgram::PaintPropertyBinders> paintPropertyBinders; + std::map<std::string, HeatmapProgram::Binders> paintPropertyBinders; const MapMode mode; }; diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp index 0375c3d089..f17a309163 100644 --- a/src/mbgl/renderer/buckets/line_bucket.cpp +++ b/src/mbgl/renderer/buckets/line_bucket.cpp @@ -528,7 +528,7 @@ bool LineBucket::supportsLayer(const style::Layer::Impl& impl) const { } template <class Property> -static float get(const RenderLineLayer& layer, const std::map<std::string, LineProgram::PaintPropertyBinders>& paintPropertyBinders) { +static float get(const RenderLineLayer& layer, const std::map<std::string, LineProgram::Binders>& paintPropertyBinders) { auto it = paintPropertyBinders.find(layer.getID()); if (it == paintPropertyBinders.end() || !it->second.statistics<Property>().max()) { return layer.evaluated.get<Property>().constantOr(Property::defaultValue()); diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp index ed742a0e63..5ebb575c6f 100644 --- a/src/mbgl/renderer/buckets/line_bucket.hpp +++ b/src/mbgl/renderer/buckets/line_bucket.hpp @@ -50,7 +50,7 @@ public: optional<gl::VertexBuffer<LineLayoutVertex>> vertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; - std::map<std::string, LineProgram::PaintPropertyBinders> paintPropertyBinders; + std::map<std::string, LineProgram::Binders> paintPropertyBinders; private: void addGeometry(const GeometryCoordinates&, const GeometryTileFeature&); diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp index 0388c5756b..4fa24aa614 100644 --- a/src/mbgl/renderer/buckets/symbol_bucket.hpp +++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp @@ -80,8 +80,8 @@ public: struct PaintProperties { style::SymbolPaintProperties::PossiblyEvaluated evaluated; - SymbolIconProgram::PaintPropertyBinders iconBinders; - SymbolSDFTextProgram::PaintPropertyBinders textBinders; + SymbolIconProgram::Binders iconBinders; + SymbolSDFTextProgram::Binders textBinders; }; std::map<std::string, PaintProperties> paintProperties; @@ -89,15 +89,15 @@ public: struct TextBuffer { gl::VertexVector<SymbolLayoutVertex> vertices; - gl::VertexVector<SymbolDynamicLayoutAttributes::Vertex> dynamicVertices; - gl::VertexVector<SymbolOpacityAttributes::Vertex> opacityVertices; + gl::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>> dynamicVertices; + gl::VertexVector<gfx::Vertex<SymbolOpacityAttributes>> opacityVertices; gl::IndexVector<gl::Triangles> triangles; SegmentVector<SymbolTextAttributes> segments; std::vector<PlacedSymbol> placedSymbols; optional<gl::VertexBuffer<SymbolLayoutVertex>> vertexBuffer; - optional<gl::VertexBuffer<SymbolDynamicLayoutAttributes::Vertex>> dynamicVertexBuffer; - optional<gl::VertexBuffer<SymbolOpacityAttributes::Vertex>> opacityVertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<SymbolDynamicLayoutAttributes>>> dynamicVertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<SymbolOpacityAttributes>>> opacityVertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; } text; @@ -105,26 +105,26 @@ public: struct IconBuffer { gl::VertexVector<SymbolLayoutVertex> vertices; - gl::VertexVector<SymbolDynamicLayoutAttributes::Vertex> dynamicVertices; - gl::VertexVector<SymbolOpacityAttributes::Vertex> opacityVertices; + gl::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>> dynamicVertices; + gl::VertexVector<gfx::Vertex<SymbolOpacityAttributes>> opacityVertices; gl::IndexVector<gl::Triangles> triangles; SegmentVector<SymbolIconAttributes> segments; std::vector<PlacedSymbol> placedSymbols; PremultipliedImage atlasImage; optional<gl::VertexBuffer<SymbolLayoutVertex>> vertexBuffer; - optional<gl::VertexBuffer<SymbolDynamicLayoutAttributes::Vertex>> dynamicVertexBuffer; - optional<gl::VertexBuffer<SymbolOpacityAttributes::Vertex>> opacityVertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<SymbolDynamicLayoutAttributes>>> dynamicVertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<SymbolOpacityAttributes>>> opacityVertexBuffer; optional<gl::IndexBuffer<gl::Triangles>> indexBuffer; } icon; struct CollisionBuffer { - gl::VertexVector<CollisionBoxLayoutAttributes::Vertex> vertices; - gl::VertexVector<CollisionBoxDynamicAttributes::Vertex> dynamicVertices; + gl::VertexVector<gfx::Vertex<CollisionBoxLayoutAttributes>> vertices; + gl::VertexVector<gfx::Vertex<CollisionBoxDynamicAttributes>> dynamicVertices; SegmentVector<CollisionBoxProgram::Attributes> segments; - optional<gl::VertexBuffer<CollisionBoxLayoutAttributes::Vertex>> vertexBuffer; - optional<gl::VertexBuffer<CollisionBoxDynamicAttributes::Vertex>> dynamicVertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<CollisionBoxLayoutAttributes>>> vertexBuffer; + optional<gl::VertexBuffer<gfx::Vertex<CollisionBoxDynamicAttributes>>> dynamicVertexBuffer; }; struct CollisionBoxBuffer : public CollisionBuffer { |