Closed bvssvni closed 3 years ago
Stencil::Clip does not always work, such as hierarchical UI. Applying nested clipping pollutes the stencil buffer.
Stencil::Clip
Stencil::Increment is used with nested clipping. Can use Stencil::Inside(depth) to draw inside at depth.
Stencil::Increment
Stencil::Inside(depth)
depth
Stencil::Increment should correspond to the following OpenGL commands:
gl::StencilFunc(gl::NEVER, 0 as gl::types::GLint, 255); gl::StencilMask(255); gl::StencilOp(gl::INCR, gl::KEEP, gl::KEEP);
It works! Closing.
Stencil::Clip
does not always work, such as hierarchical UI. Applying nested clipping pollutes the stencil buffer.Stencil::Increment
is used with nested clipping. Can useStencil::Inside(depth)
to draw inside atdepth
.Stencil::Increment
should correspond to the following OpenGL commands: