summaryrefslogtreecommitdiff
path: root/src/mbgl/programs/uniforms.hpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2017-05-18 09:37:21 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2017-05-23 12:59:27 -0700
commit1759603e128ad0a08f4a25009b82695420ec2840 (patch)
tree77d74c683ca34efc25bd79cbb25774049dbfc695 /src/mbgl/programs/uniforms.hpp
parent9e1cbbeacb4007f9c7919185df0aae90fc8f7ad1 (diff)
downloadqtlocation-mapboxgl-1759603e128ad0a08f4a25009b82695420ec2840.tar.gz
[core] Simplify and fix sprite atlas coordinate calculations
* Always return image metrics exclusive of padding * Work with integer coordinates whenever possible * Eliminate redundant SpriteAtlasElement members * Fix asymmetric re-padding in getIconQuad when pixelRatio != 1 * Add explanatory comments
Diffstat (limited to 'src/mbgl/programs/uniforms.hpp')
-rw-r--r--src/mbgl/programs/uniforms.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mbgl/programs/uniforms.hpp b/src/mbgl/programs/uniforms.hpp
index a2bfe396b1..78ac09942c 100644
--- a/src/mbgl/programs/uniforms.hpp
+++ b/src/mbgl/programs/uniforms.hpp
@@ -22,10 +22,10 @@ MBGL_DEFINE_UNIFORM_SCALAR(Size, u_texsize);
MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_extrude_scale);
-MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_tl_a);
-MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_br_a);
-MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_tl_b);
-MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_br_b);
+MBGL_DEFINE_UNIFORM_VECTOR(uint16_t, 2, u_pattern_tl_a);
+MBGL_DEFINE_UNIFORM_VECTOR(uint16_t, 2, u_pattern_br_a);
+MBGL_DEFINE_UNIFORM_VECTOR(uint16_t, 2, u_pattern_tl_b);
+MBGL_DEFINE_UNIFORM_VECTOR(uint16_t, 2, u_pattern_br_b);
MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_size_a);
MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pattern_size_b);
MBGL_DEFINE_UNIFORM_VECTOR(float, 2, u_pixel_coord_upper);