Merge branch 'nostencil'

Conflicts:
	macosx/main.mm
	src/map/map.cpp
This commit is contained in:
Konstantin Käfer
2014-03-03 16:02:13 +01:00
5 changed files with 93 additions and 77 deletions

View File

@@ -414,10 +414,26 @@ bool Map::render() {
painter.clear();
painter.changeMatrix();
// First, update all tile matrices with the new transform and render into
// the stencil buffer.
uint8_t i = 1;
painter.prepareClippingMask();
for (Tile::Ptr& tile : tiles) {
assert(tile);
if (tile->state == Tile::parsed) {
painter.changeMatrix(tile->id);
// The position matrix.
transform.matrixFor(tile->matrix, tile->id);
matrix::multiply(tile->matrix, painter.projMatrix, tile->matrix);
tile->clip_id = i++;
painter.drawClippingMask(tile->matrix, tile->clip_id);
}
}
painter.finishClippingMask();
for (Tile::Ptr& tile : tiles) {
if (tile->state == Tile::parsed) {
painter.render(tile);
}
}