diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-04-02 14:11:37 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2019-05-15 11:57:43 -0700 |
commit | 03e434e901cebf3b78bcba9ef9c7fe941012735e (patch) | |
tree | 77f19ea45ca69e96d7b4c6109ca2d183efcf680c /src | |
parent | 179c5fe83ba4ebe593208db9ca41f409024824ef (diff) | |
download | qtlocation-mapboxgl-03e434e901cebf3b78bcba9ef9c7fe941012735e.tar.gz |
[core] use float for storing opacity attribute
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/programs/attributes.hpp | 2 | ||||
-rw-r--r-- | src/mbgl/programs/symbol_program.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mbgl/programs/attributes.hpp b/src/mbgl/programs/attributes.hpp index 803a9db503..003a3ae03e 100644 --- a/src/mbgl/programs/attributes.hpp +++ b/src/mbgl/programs/attributes.hpp @@ -16,7 +16,7 @@ MBGL_DEFINE_ATTRIBUTE(int16_t, 2, label_pos); MBGL_DEFINE_ATTRIBUTE(int16_t, 2, anchor_pos); MBGL_DEFINE_ATTRIBUTE(uint16_t, 2, texture_pos); MBGL_DEFINE_ATTRIBUTE(int16_t, 4, normal_ed); -MBGL_DEFINE_ATTRIBUTE(uint8_t, 1, fade_opacity); +MBGL_DEFINE_ATTRIBUTE(float, 1, fade_opacity); MBGL_DEFINE_ATTRIBUTE(uint8_t, 2, placed); MBGL_DEFINE_ATTRIBUTE(uint16_t, 3, size); MBGL_DEFINE_ATTRIBUTE(float, 1, offset); diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp index 158dee3013..80e6245a03 100644 --- a/src/mbgl/programs/symbol_program.hpp +++ b/src/mbgl/programs/symbol_program.hpp @@ -231,7 +231,7 @@ public: static gfx::Vertex<SymbolOpacityAttributes> opacityVertex(bool placed, float opacity) { return { - {{ static_cast<uint8_t>((static_cast<uint8_t>(opacity * 127) << 1) | static_cast<uint8_t>(placed)) }} + {{ static_cast<float>((static_cast<uint8_t>(opacity * 127) << 1) | static_cast<uint8_t>(placed)) }} }; } }; |