From f97ba60da46445b15fcdea9bd6c1d7ceb63138e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Thu, 31 May 2018 15:15:12 +0200 Subject: [core] rename gl::Attribute to gl::Attribute to remove overloaded naming --- src/mbgl/gl/attribute.hpp | 6 ++-- src/mbgl/programs/attributes.hpp | 44 ++++++++++++++--------------- src/mbgl/programs/symbol_program.hpp | 2 +- src/mbgl/renderer/paint_property_binder.hpp | 14 ++++----- 4 files changed, 33 insertions(+), 33 deletions(-) (limited to 'src') diff --git a/src/mbgl/gl/attribute.hpp b/src/mbgl/gl/attribute.hpp index 6bb38f6102..de95be0733 100644 --- a/src/mbgl/gl/attribute.hpp +++ b/src/mbgl/gl/attribute.hpp @@ -46,12 +46,12 @@ public: using AttributeBindingArray = std::vector>; /* - gl::Attribute manages the binding of a vertex buffer to a GL program attribute. + gl::AttributeType manages the binding of a vertex buffer to a GL program attribute. - T is the underlying primitive type (exposed as Attribute::ValueType) - N is the number of components in the attribute declared in the shader (exposed as Attribute::Dimensions) */ template -class Attribute { +class AttributeType { public: using ValueType = T; static constexpr size_t Dimensions = N; @@ -96,7 +96,7 @@ public: #define MBGL_DEFINE_ATTRIBUTE(type_, n_, name_) \ struct name_ { \ static auto name() { return #name_; } \ - using Type = ::mbgl::gl::Attribute; \ + using Type = ::mbgl::gl::AttributeType; \ } namespace detail { diff --git a/src/mbgl/programs/attributes.hpp b/src/mbgl/programs/attributes.hpp index c677c84d5d..f1f1bdaa3f 100644 --- a/src/mbgl/programs/attributes.hpp +++ b/src/mbgl/programs/attributes.hpp @@ -35,116 +35,116 @@ MBGL_DEFINE_ATTRIBUTE(uint8_t, 2, a_placed); template struct a_data { static auto name() { return "a_data"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_size { static auto name() { return "a_size"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; template struct a_offset { static auto name() { return "a_offset"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; // Paint attributes struct a_color { static auto name() { return "a_color"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_fill_color { static auto name() { return "a_fill_color"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_halo_color { static auto name() { return "a_halo_color"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_stroke_color { static auto name() { return "a_stroke_color"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_outline_color { static auto name() { return "a_outline_color"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_opacity { static auto name() { return "a_opacity"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_stroke_opacity { static auto name() { return "a_stroke_opacity"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_blur { static auto name() { return "a_blur"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_radius { static auto name() { return "a_radius"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_width { static auto name() { return "a_width"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_floorwidth { static auto name() { return "a_floorwidth"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_height { static auto name() { return "a_height"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_base { static auto name() { return "a_base"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_gapwidth { static auto name() { return "a_gapwidth"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_stroke_width { static auto name() { return "a_stroke_width"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; template <> struct a_offset<1> { static auto name() { return "a_offset"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_halo_width { static auto name() { return "a_halo_width"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_halo_blur { static auto name() { return "a_halo_blur"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; struct a_weight { static auto name() { return "a_weight"; } - using Type = gl::Attribute; + using Type = gl::AttributeType; }; } // namespace attributes diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 651f12828f..a1a4621b62 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -185,7 +185,7 @@ public: class SourceFunctionSymbolSizeBinder final : public SymbolSizeBinder { public: - using Vertex = gl::detail::Vertex>; + using Vertex = gl::detail::Vertex>; using VertexVector = gl::VertexVector; using VertexBuffer = gl::VertexBuffer; diff --git a/src/mbgl/renderer/paint_property_binder.hpp b/src/mbgl/renderer/paint_property_binder.hpp index 6a0f5e3a46..82c36399a9 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -19,7 +19,7 @@ namespace mbgl { being zoomed. */ template -using ZoomInterpolatedAttributeType = gl::Attribute; +using ZoomInterpolatedAttributeType = gl::AttributeType; inline std::array attributeValue(float v) { return {{ v }}; @@ -122,7 +122,7 @@ public: using BaseAttributeValue = typename BaseAttribute::Value; using BaseVertex = gl::detail::Vertex; - using Attribute = ZoomInterpolatedAttributeType; + using AttributeType = ZoomInterpolatedAttributeType; SourceFunctionPaintPropertyBinder(style::PropertyExpression expression_, T defaultValue_) : expression(std::move(expression_)), @@ -146,7 +146,7 @@ public: if (currentValue.isConstant()) { return {}; } else { - return Attribute::binding(*vertexBuffer, 0, BaseAttribute::Dimensions); + return AttributeType::binding(*vertexBuffer, 0, BaseAttribute::Dimensions); } } @@ -174,9 +174,9 @@ template class CompositeFunctionPaintPropertyBinder : public PaintPropertyBinder { public: - using Attribute = ZoomInterpolatedAttributeType; - using AttributeValue = typename Attribute::Value; - using Vertex = gl::detail::Vertex; + using AttributeType = ZoomInterpolatedAttributeType; + using AttributeValue = typename AttributeType::Value; + using Vertex = gl::detail::Vertex; CompositeFunctionPaintPropertyBinder(style::PropertyExpression expression_, float zoom, T defaultValue_) : expression(std::move(expression_)), @@ -204,7 +204,7 @@ public: if (currentValue.isConstant()) { return {}; } else { - return Attribute::binding(*vertexBuffer, 0); + return AttributeType::binding(*vertexBuffer, 0); } } -- cgit v1.2.1