Refactor clipping mask rendering (#1209)

This commit is contained in:
Tim Sylvester
2023-06-06 14:15:40 -07:00
committed by Bart Louwers
parent 172cc0a43f
commit 00d6bdd2ae
19 changed files with 180 additions and 88 deletions

View File

@@ -41,10 +41,8 @@ void DrawableGL::draw(const PaintParameters& parameters) const {
// force disable depth test for debugging
// setDepthMode({gfx::DepthFunctionType::Always, gfx::DepthMaskType::ReadOnly, {0,1}});
if (tileID) {
// Doesn't work until the clipping masks are generated
// parameters.stencilModeForClipping(tileID->toUnwrapped());
context.setStencilMode(gfx::StencilMode::disabled());
if (needsStencil && tileID) {
context.setStencilMode(parameters.stencilModeForClipping(tileID->toUnwrapped()));
} else {
context.setStencilMode(gfx::StencilMode::disabled());
}