summaryrefslogtreecommitdiff
path: root/src/geometry
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-03-25 12:10:19 +0100
committerKonstantin Käfer <mail@kkaefer.com>2014-03-25 12:10:19 +0100
commitd5b4c1162dab706d6f56881e3f72baa003ad8ac7 (patch)
treec55948596d4f55019bfbd0a265d8681253bdc4ce /src/geometry
parentafe27ed74c00d104c89ea1391b81f21be0d3112d (diff)
downloadqtlocation-mapboxgl-d5b4c1162dab706d6f56881e3f72baa003ad8ac7.tar.gz
add shader optimizer and reorder components
Diffstat (limited to 'src/geometry')
-rw-r--r--src/geometry/text_buffer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/geometry/text_buffer.cpp b/src/geometry/text_buffer.cpp
index cf130225e5..5e4a53040f 100644
--- a/src/geometry/text_buffer.cpp
+++ b/src/geometry/text_buffer.cpp
@@ -19,10 +19,13 @@ size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t
shorts[3] = round(oy * 64);
uint8_t *ubytes = static_cast<uint8_t *>(data);
+ // a_data1
ubytes[8] = tx / 4;
ubytes[9] = ty / 4;
ubytes[10] = labelminzoom * 10;
ubytes[11] = minzoom * 10; // 1/10 zoom levels: z16 == 160.
+
+ // a_data2
ubytes[12] = fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160.
ubytes[13] = (int16_t)round(angle * angleFactor) % 256;
ubytes[14] = util::max((int16_t)round(range[0] * angleFactor), (int16_t)0) % 256;