[core] Remove obsolete modular arithmetic on atlas coordinates

We switched to 16-bit coordinates in attributes in b0cb8715ed, so there's no longer any reason to require that they are divisible by four.
This commit is contained in:
John Firebaugh
2017-05-17 08:58:36 -07:00
parent 4c26759b69
commit 63558e06ad
6 changed files with 15 additions and 28 deletions

View File

@@ -51,7 +51,7 @@ Values makeValues(const bool isText,
values.translateAnchor,
state) },
uniforms::u_extrude_scale::Value{ extrudeScale },
uniforms::u_texsize::Value{ std::array<float, 2> {{ float(texsize.width) / 4, float(texsize.height) / 4 }} },
uniforms::u_texsize::Value{ std::array<float, 2> {{ float(texsize.width), float(texsize.height) }} },
uniforms::u_zoom::Value{ float(state.getZoom()) },
uniforms::u_rotate_with_map::Value{ values.rotationAlignment == AlignmentType::Map },
uniforms::u_texture::Value{ 0 },

View File

@@ -67,8 +67,8 @@ struct SymbolLayoutAttributes : gl::Attributes<
static_cast<int16_t>(::round(o.y * 64))
}},
{{
static_cast<uint16_t>(tx / 4),
static_cast<uint16_t>(ty / 4),
tx,
ty,
mbgl::attributes::packUint8Pair(
static_cast<uint8_t>(labelminzoom * 10), // 1/10 zoom levels: z16 == 160
static_cast<uint8_t>(labelangle)