diff options
author | Lauren Budorick <lauren@mapbox.com> | 2017-12-20 15:17:11 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-20 15:17:11 -0500 |
commit | 920057c9d6285fc30f4155a505e2bf15143e3842 (patch) | |
tree | 37c9e1c357f818799be29d56f3c5cdafa8a58797 /src/mbgl/programs | |
parent | d744b5033b994e2301621f68565cef622e3ba40f (diff) | |
download | qtlocation-mapboxgl-920057c9d6285fc30f4155a505e2bf15143e3842.tar.gz |
[core] Better align fill-extrusion vertex layout
Diffstat (limited to 'src/mbgl/programs')
-rw-r--r-- | src/mbgl/programs/attributes.hpp | 3 | ||||
-rw-r--r-- | src/mbgl/programs/fill_extrusion_program.hpp | 10 |
2 files changed, 4 insertions, 9 deletions
diff --git a/src/mbgl/programs/attributes.hpp b/src/mbgl/programs/attributes.hpp index 437ae2195c..b0582b0bc2 100644 --- a/src/mbgl/programs/attributes.hpp +++ b/src/mbgl/programs/attributes.hpp @@ -28,8 +28,7 @@ MBGL_DEFINE_ATTRIBUTE(float, 3, a_projected_pos); MBGL_DEFINE_ATTRIBUTE(int16_t, 2, a_label_pos); MBGL_DEFINE_ATTRIBUTE(int16_t, 2, a_anchor_pos); MBGL_DEFINE_ATTRIBUTE(uint16_t, 2, a_texture_pos); -MBGL_DEFINE_ATTRIBUTE(int16_t, 3, a_normal); -MBGL_DEFINE_ATTRIBUTE(uint16_t, 1, a_edgedistance); +MBGL_DEFINE_ATTRIBUTE(int16_t, 4, a_normal_ed); MBGL_DEFINE_ATTRIBUTE(uint8_t, 1, a_fade_opacity); MBGL_DEFINE_ATTRIBUTE(uint8_t, 2, a_placed); diff --git a/src/mbgl/programs/fill_extrusion_program.hpp b/src/mbgl/programs/fill_extrusion_program.hpp index 820670068e..c499e9ef2d 100644 --- a/src/mbgl/programs/fill_extrusion_program.hpp +++ b/src/mbgl/programs/fill_extrusion_program.hpp @@ -30,8 +30,7 @@ MBGL_DEFINE_UNIFORM_SCALAR(float, u_height_factor); struct FillExtrusionLayoutAttributes : gl::Attributes< attributes::a_pos, - attributes::a_normal, - attributes::a_edgedistance> + attributes::a_normal_ed> {}; struct FillExtrusionUniforms : gl::Uniforms< @@ -100,12 +99,9 @@ public: // We pack a bool (`t`) into the x component indicating whether it is an upper or lower vertex static_cast<int16_t>(floor(nx * factor) * 2 + t), static_cast<int16_t>(ny * factor * 2), - static_cast<int16_t>(nz * factor * 2) - - }}, - {{ + static_cast<int16_t>(nz * factor * 2), // The edgedistance attribute is used for wrapping fill_extrusion patterns - e + static_cast<int16_t>(e) }} }; } |