Reparse tiles when zoom level > source maxzoom
so that layout property functions are applied correctly
and so that label placement is redone
js:
https://github.com/mapbox/mapbox-gl-js/pull/1005
and
440bc02505
This commit is contained in:
@@ -67,41 +67,3 @@ void Painter::renderDebugFrame(const mat4 &matrix) {
|
||||
lineWidth(4.0f * state.getPixelRatio());
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_LINE_STRIP, 0, (GLsizei)tileBorderBuffer.index()));
|
||||
}
|
||||
|
||||
void Painter::renderDebugText(const std::vector<std::string> &strings) {
|
||||
if (strings.empty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
gl::debugging::group group("debug text");
|
||||
|
||||
config.depthTest = false;
|
||||
config.stencilTest = true;
|
||||
config.stencilFunc = { GL_ALWAYS, 0xFF, 0xFF };
|
||||
|
||||
useProgram(plainShader->program);
|
||||
plainShader->u_matrix = nativeMatrix;
|
||||
|
||||
DebugFontBuffer debugFontBuffer;
|
||||
int line = 25;
|
||||
for (const auto& str : strings) {
|
||||
debugFontBuffer.addText(str.c_str(), 10, line, 0.75);
|
||||
line += 20;
|
||||
}
|
||||
|
||||
if (!debugFontBuffer.empty()) {
|
||||
// draw debug info
|
||||
VertexArrayObject debugFontArray;
|
||||
debugFontArray.bind(*plainShader, debugFontBuffer, BUFFER_OFFSET(0));
|
||||
plainShader->u_color = {{ 1.0f, 1.0f, 1.0f, 1.0f }};
|
||||
lineWidth(4.0f * state.getPixelRatio());
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
|
||||
#ifndef GL_ES_VERSION_2_0
|
||||
MBGL_CHECK_ERROR(glPointSize(2));
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_POINTS, 0, (GLsizei)debugFontBuffer.index()));
|
||||
#endif
|
||||
plainShader->u_color = {{ 0.0f, 0.0f, 0.0f, 1.0f }};
|
||||
lineWidth(2.0f * state.getPixelRatio());
|
||||
MBGL_CHECK_ERROR(glDrawArrays(GL_LINES, 0, (GLsizei)debugFontBuffer.index()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user