diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2018-05-31 14:41:10 +0200 |
---|---|---|
committer | Molly Lloyd <mollymerp@users.noreply.github.com> | 2018-08-31 13:08:47 -0700 |
commit | abc5043339d1aa8eb25e449248ae5a95e00835a3 (patch) | |
tree | c2dc30d9ae6e9a5ce5c72bb0339a80e19dd5bbd0 /src/mbgl/renderer/paint_property_binder.hpp | |
parent | 0dac3bc60c549c46f341984439d6fd007fe2ffe6 (diff) | |
download | qtlocation-mapboxgl-abc5043339d1aa8eb25e449248ae5a95e00835a3.tar.gz |
[core] simplify attribute/location types
Diffstat (limited to 'src/mbgl/renderer/paint_property_binder.hpp')
-rw-r--r-- | src/mbgl/renderer/paint_property_binder.hpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index aade672ae7..6a0f5e3a46 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -75,14 +75,12 @@ std::array<float, N*2> zoomInterpolatedAttributeValue(const std::array<float, N> template <class T, class A> class PaintPropertyBinder { public: - using Attribute = ZoomInterpolatedAttributeType<A>; - using AttributeBinding = typename Attribute::Binding; virtual ~PaintPropertyBinder() = default; virtual void populateVertexVector(const GeometryTileFeature& feature, std::size_t length) = 0; virtual void upload(gl::Context& context) = 0; - virtual optional<AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const = 0; + virtual optional<gl::AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const = 0; virtual float interpolationFactor(float currentZoom) const = 0; virtual T uniformValue(const PossiblyEvaluatedPropertyValue<T>& currentValue) const = 0; @@ -94,9 +92,6 @@ public: template <class T, class A> class ConstantPaintPropertyBinder : public PaintPropertyBinder<T, A> { public: - using Attribute = ZoomInterpolatedAttributeType<A>; - using AttributeBinding = typename Attribute::Binding; - ConstantPaintPropertyBinder(T constant_) : constant(std::move(constant_)) { } @@ -104,7 +99,7 @@ public: void populateVertexVector(const GeometryTileFeature&, std::size_t) override {} void upload(gl::Context&) override {} - optional<AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>&) const override { + optional<gl::AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>&) const override { return {}; } @@ -128,7 +123,6 @@ public: using BaseVertex = gl::detail::Vertex<BaseAttribute>; using Attribute = ZoomInterpolatedAttributeType<A>; - using AttributeBinding = typename Attribute::Binding; SourceFunctionPaintPropertyBinder(style::PropertyExpression<T> expression_, T defaultValue_) : expression(std::move(expression_)), @@ -148,7 +142,7 @@ public: vertexBuffer = context.createVertexBuffer(std::move(vertexVector)); } - optional<AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const override { + optional<gl::AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const override { if (currentValue.isConstant()) { return {}; } else { @@ -179,12 +173,9 @@ private: template <class T, class A> class CompositeFunctionPaintPropertyBinder : public PaintPropertyBinder<T, A> { public: - using BaseAttribute = A; - using BaseAttributeValue = typename BaseAttribute::Value; using Attribute = ZoomInterpolatedAttributeType<A>; using AttributeValue = typename Attribute::Value; - using AttributeBinding = typename Attribute::Binding; using Vertex = gl::detail::Vertex<Attribute>; CompositeFunctionPaintPropertyBinder(style::PropertyExpression<T> expression_, float zoom, T defaultValue_) @@ -209,7 +200,7 @@ public: vertexBuffer = context.createVertexBuffer(std::move(vertexVector)); } - optional<AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const override { + optional<gl::AttributeBinding> attributeBinding(const PossiblyEvaluatedPropertyValue<T>& currentValue) const override { if (currentValue.isConstant()) { return {}; } else { |