diff --git a/src/renderer/text_bucket.cpp b/src/renderer/text_bucket.cpp index a25d12ef2..8e488f21f 100644 --- a/src/renderer/text_bucket.cpp +++ b/src/renderer/text_bucket.cpp @@ -93,11 +93,12 @@ void TextBucket::addGlyphs(const PlacedGlyphs &glyphs, float placementZoom, // add the two triangles, referencing the four coordinates we just // inserted. triangleElementsBuffer->add(triangleIndex + 0, triangleIndex + 1, - triangleIndex + 1); + triangleIndex + 2); triangleElementsBuffer->add(triangleIndex + 1, triangleIndex + 2, triangleIndex + 3); triangleGroup.vertex_length += glyph_vertex_length; + triangleGroup.elements_length += 2; } }; diff --git a/src/shader/text_shader.cpp b/src/shader/text_shader.cpp index 8df22f25f..599bba3d1 100644 --- a/src/shader/text_shader.cpp +++ b/src/shader/text_shader.cpp @@ -65,8 +65,6 @@ TextShader::TextShader() } void TextShader::bind(char *offset) { - fprintf(stderr, "bind textshader\n"); - glEnableVertexAttribArray(a_pos); glVertexAttribPointer(a_pos, 2, GL_SHORT, false, 16, offset + 0); diff --git a/src/style/style_parser.cpp b/src/style/style_parser.cpp index 42bda94b2..9d4ee2cf6 100644 --- a/src/style/style_parser.cpp +++ b/src/style/style_parser.cpp @@ -279,9 +279,9 @@ Color StyleParser::parseColor(JSVal value) { throw Style::exception("color values must be numbers"); } - return {{static_cast(r.GetDouble() / 255), - static_cast(g.GetDouble() / 255), - static_cast(b.GetDouble() / 255), + return {{static_cast(r.GetDouble()), + static_cast(g.GetDouble()), + static_cast(b.GetDouble()), static_cast(a.GetDouble())}}; } else if (!value.IsString()) {