diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-05 11:52:23 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2014-09-05 13:23:14 -0700 |
commit | 9d5f02ccaa051a0f3459f6fc94df807338fa2552 (patch) | |
tree | 0b13c6913c61aa01e928983a0e33f1a0bd197ad4 /src/geometry/text_buffer.cpp | |
parent | 7b9ad022a904110eb15260b2cbf56e6f6b8a03cf (diff) | |
download | qtlocation-mapboxgl-9d5f02ccaa051a0f3459f6fc94df807338fa2552.tar.gz |
Match js shaders
The only non-incidental change is to revert portions
of d5b4c116 and 3a9a9043.
See https://github.com/mapbox/mapbox-gl-native/commit/d5b4c1162dab706d6f56881e3f72baa003ad8ac7#commitcomment-7668050
Diffstat (limited to 'src/geometry/text_buffer.cpp')
-rw-r--r-- | src/geometry/text_buffer.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/geometry/text_buffer.cpp b/src/geometry/text_buffer.cpp index cb30101839..b4b609b705 100644 --- a/src/geometry/text_buffer.cpp +++ b/src/geometry/text_buffer.cpp @@ -19,15 +19,12 @@ size_t TextVertexBuffer::add(int16_t x, int16_t y, float ox, float oy, uint16_t shorts[3] = std::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] = (int16_t)std::round(angle * angleFactor) % 256; - - // a_data2 - ubytes[12] = minzoom * 10; // 1/10 zoom levels: z16 == 160. - ubytes[13] = std::fmin(maxzoom, 25) * 10; // 1/10 zoom levels: z16 == 160. + ubytes[11] = minzoom * 10; // 1/10 zoom levels: z16 == 160. + 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)std::round(range[0] * angleFactor), (int16_t)0) % 256; ubytes[15] = util::min((int16_t)std::round(range[1] * angleFactor), (int16_t)255) % 256; |