port collision box debug rendering
This commit is contained in:
@@ -189,5 +189,20 @@ void Painter::renderSymbol(SymbolBucket &bucket, const StyleLayer &layer_desc, c
|
||||
&SymbolBucket::drawGlyphs);
|
||||
}
|
||||
|
||||
if (bucket.hasCollisionBoxData()) {
|
||||
MBGL_CHECK_ERROR(glEnable(GL_STENCIL_TEST));
|
||||
|
||||
useProgram(collisionBoxShader->program);
|
||||
collisionBoxShader->u_matrix = matrix;
|
||||
collisionBoxShader->u_scale = std::pow(2, state.getNormalizedZoom() - id.z);
|
||||
collisionBoxShader->u_zoom = state.getNormalizedZoom() * 10;
|
||||
collisionBoxShader->u_maxzoom = (id.z + 1) * 10;
|
||||
lineWidth(3.0f);
|
||||
|
||||
depthRange(strata, 1.0f);
|
||||
bucket.drawCollisionBoxes(*collisionBoxShader);
|
||||
|
||||
}
|
||||
|
||||
MBGL_CHECK_ERROR(glEnable(GL_STENCIL_TEST));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user