compute unique clip ids per tile, taking covering children into account

fixes #206
fixes #220
refs #229
This commit is contained in:
Konstantin Käfer
2014-08-21 15:02:08 +02:00
parent b9c7e1bdd9
commit 863b4577e4
11 changed files with 337 additions and 439 deletions

View File

@@ -169,9 +169,9 @@ void Painter::setStrata(float value) {
}
void Painter::prepareTile(const Tile& tile) {
GLint id = (GLint)tile.clip.mask.to_ulong();
GLuint mask = clipMask[tile.clip.length];
glStencilFunc(GL_EQUAL, id, mask);
const GLint ref = (GLint)tile.clip.reference.to_ulong();
const GLuint mask = (GLuint)tile.clip.mask.to_ulong();
glStencilFunc(GL_EQUAL, ref, mask);
}
void Painter::renderTileLayer(const Tile& tile, std::shared_ptr<StyleLayer> layer_desc, const mat4 &matrix) {