You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yeah I saw that, but I don't think anything in there is quite what I'd like to do. I was trying to do something like this:
|triangles, transform, g| {// create the stencil
g.clear_stencil(0);let clip = DrawState::new_clip().blend(Blend::Invert);for triangle in triangles {Polygon::new([1.0,1.0,1.0,1.0]).draw(triangle,&clip, transform, g);}// fill the stenciled areaRectangle::new([1.0,0.0,0.0,1.0]).draw([0.0,0.0,100.0,100.0],&DrawState::new_inside(), transform, g);}
But it looks like the blend mode for the stencil drawing is always just adding because the StencilOp is always bound as gl::StencilOp(gl::REPLACE, gl::KEEP, gl::KEEP); if the stencil is Clip(val).
looks like
Blend::Invert
will not work when drawing to the stencil buffer. This is one of the easiest ways I've found of drawing non-convex polygons.Could this be supported? I took a look at the draw_state code and I wasn't sure how to go about implementing such support.
The text was updated successfully, but these errors were encountered: