summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer/paint_property_binder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/renderer/paint_property_binder.hpp')
-rw-r--r--src/mbgl/renderer/paint_property_binder.hpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp
index 378a3b170b..37bd30fb82 100644
--- a/src/mbgl/renderer/paint_property_binder.hpp
+++ b/src/mbgl/renderer/paint_property_binder.hpp
@@ -268,9 +268,22 @@ class PaintPropertyBinders;
template <class... Ps>
class PaintPropertyBinders<TypeList<Ps...>> {
+private:
+ template <class T, class... As>
+ struct Detail;
+
+ template <class T, class... As>
+ struct Detail<T, TypeList<As...>> {
+ using Binder = PaintPropertyBinder<T, typename As::Type...>;
+ using ZoomInterpolatedAttributeList = TypeList<ZoomInterpolatedAttribute<As>...>;
+ };
+
+ template <class P>
+ using Property = Detail<typename P::Type, typename P::Attributes>;
+
public:
template <class P>
- using Binder = PaintPropertyBinder<typename P::Type, typename P::Attribute::Type>;
+ using Binder = typename Property<P>::Binder;
using Binders = IndexedTuple<
TypeList<Ps...>,
@@ -298,9 +311,9 @@ public:
}
template <class P>
- using Attribute = ZoomInterpolatedAttribute<typename P::Attribute>;
+ using ZoomInterpolatedAttributeList = typename Property<P>::ZoomInterpolatedAttributeList;
- using Attributes = gl::Attributes<Attribute<Ps>...>;
+ using Attributes = typename TypeListConcat<ZoomInterpolatedAttributeList<Ps>...>::template ExpandInto<gl::Attributes>;
using AttributeBindings = typename Attributes::Bindings;
template <class EvaluatedProperties>