diff options
Diffstat (limited to 'src/mbgl/programs/attributes.hpp')
-rw-r--r-- | src/mbgl/programs/attributes.hpp | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/mbgl/programs/attributes.hpp b/src/mbgl/programs/attributes.hpp index c4cc5dea8b..bb90f2c13c 100644 --- a/src/mbgl/programs/attributes.hpp +++ b/src/mbgl/programs/attributes.hpp @@ -64,6 +64,34 @@ struct a_color : gl::Attribute<gl::Normalized<uint8_t>, 4> { } }; +// used in the symbol sdf shader +struct a_fill_color : gl::Attribute<gl::Normalized<uint8_t>, 4> { + static auto name() { return "a_fill_color"; } + + static Value value(const Color& color) { + return {{ + gl::Normalized<uint8_t>(color.r), + gl::Normalized<uint8_t>(color.g), + gl::Normalized<uint8_t>(color.b), + gl::Normalized<uint8_t>(color.a) + }}; + } +}; + +// used in the symbol sdf shader +struct a_halo_color : gl::Attribute<gl::Normalized<uint8_t>, 4> { + static auto name() { return "a_halo_color"; } + + static Value value(const Color& color) { + return {{ + gl::Normalized<uint8_t>(color.r), + gl::Normalized<uint8_t>(color.g), + gl::Normalized<uint8_t>(color.b), + gl::Normalized<uint8_t>(color.a) + }}; + } +}; + struct a_stroke_color : gl::Attribute<gl::Normalized<uint8_t>, 4> { static auto name() { return "a_stroke_color"; } @@ -171,5 +199,23 @@ struct a_offset<1> : gl::Attribute<float, 1> { } }; +struct a_halo_width : gl::Attribute<float, 1> { + static auto name() { return "a_halo_width"; } + + static Value value(float width) { + return {{ width }}; + } +}; + +struct a_halo_blur : gl::Attribute<float, 1> { + static auto name() { return "a_halo_blur"; } + + static Value value(float blur) { + return {{ blur }}; + } +}; + + + } // namespace attributes } // namespace mbgl |