From 3f1d754369fe0a12f924c3dd47ad028c98b8e3b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20K=C3=A4fer?= Date: Wed, 27 Feb 2019 14:03:07 +0100 Subject: [core] rename gl::AttributeType to gl::Attribute to free up the name --- src/mbgl/gl/attribute.hpp | 6 ++-- src/mbgl/programs/attributes.hpp | 48 ++++++++++++++--------------- src/mbgl/programs/symbol_program.hpp | 2 +- src/mbgl/renderer/paint_property_binder.hpp | 2 +- 4 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/mbgl/gl/attribute.hpp b/src/mbgl/gl/attribute.hpp index c572ef7d47..a1c35f3746 100644 --- a/src/mbgl/gl/attribute.hpp +++ b/src/mbgl/gl/attribute.hpp @@ -46,12 +46,12 @@ public: using AttributeBindingArray = std::vector>; /* - gl::AttributeType manages the binding of a vertex buffer to a GL program attribute. + gl::Attribute 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 AttributeType { +class Attribute { 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::AttributeType; \ + using Type = ::mbgl::gl::Attribute; \ } namespace detail { diff --git a/src/mbgl/programs/attributes.hpp b/src/mbgl/programs/attributes.hpp index 4a20db43b9..d5508e8f1a 100644 --- a/src/mbgl/programs/attributes.hpp +++ b/src/mbgl/programs/attributes.hpp @@ -35,126 +35,126 @@ MBGL_DEFINE_ATTRIBUTE(uint8_t, 2, a_placed); template struct a_data { static auto name() { return "a_data"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_size { static auto name() { return "a_size"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; template struct a_offset { static auto name() { return "a_offset"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; // Paint attributes struct a_color { static auto name() { return "a_color"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_fill_color { static auto name() { return "a_fill_color"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_halo_color { static auto name() { return "a_halo_color"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_stroke_color { static auto name() { return "a_stroke_color"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_outline_color { static auto name() { return "a_outline_color"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_opacity { static auto name() { return "a_opacity"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_stroke_opacity { static auto name() { return "a_stroke_opacity"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_blur { static auto name() { return "a_blur"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_radius { static auto name() { return "a_radius"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_width { static auto name() { return "a_width"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_floorwidth { static auto name() { return "a_floorwidth"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_height { static auto name() { return "a_height"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_base { static auto name() { return "a_base"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_gapwidth { static auto name() { return "a_gapwidth"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_stroke_width { static auto name() { return "a_stroke_width"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; template <> struct a_offset<1> { static auto name() { return "a_offset"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_halo_width { static auto name() { return "a_halo_width"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_halo_blur { static auto name() { return "a_halo_blur"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_weight { static auto name() { return "a_weight"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_pattern_to { static auto name() { return "a_pattern_to"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; struct a_pattern_from { static auto name() { return "a_pattern_from"; } - using Type = gl::AttributeType; + using Type = gl::Attribute; }; } // namespace attributes diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 30091c5980..155c277f11 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -146,7 +146,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 9449ca5823..09cea12030 100644 --- a/src/mbgl/renderer/paint_property_binder.hpp +++ b/src/mbgl/renderer/paint_property_binder.hpp @@ -25,7 +25,7 @@ namespace mbgl { being zoomed. */ template -using ZoomInterpolatedAttributeType = gl::AttributeType; +using ZoomInterpolatedAttributeType = gl::Attribute; inline std::array attributeValue(float v) { return {{ v }}; -- cgit v1.2.1