<div dir="ltr"><div dir="ltr">Stencil masks aren't used often in VTK, though the LabeledContourMapper will use them, see:<br><br><a href="https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/vtkOpenGLLabeledContourMapper.cxx#L130">https://gitlab.kitware.com/vtk/vtk/blob/master/Rendering/OpenGL2/vtkOpenGLLabeledContourMapper.cxx#L130</a><br><br>Using them requires enabling stencil buffers via the RenderWindow API and <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">writing a new OpenGL mapper or renderpass to setup the GL state</span>. There is not an existing general way to render arbitrary actors into a stencil buffer that I am aware of.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 4, 2018 at 9:03 PM, pnt1614 <span dir="ltr"><<a href="mailto:minpu.code@gmail.com" target="_blank">minpu.code@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I can do a clipping and fill a hole using the stencil buffer in OpenGL, so is<br>
there anyway to enable and use the stencil buffer in VTK? I have checked<br>
some examples about vtkImageStencil but how to enable stencil tests when<br>
rendering objects?<br>
<br>
Is there anybody experienced this problem? Please, help me.<br>
<br>
<br>
<br>
--<br>
Sent from: <a href="http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html" rel="noreferrer" target="_blank">http://vtk.1045678.n5.nabble.<wbr>com/VTK-Users-f1224199.html</a><br>
______________________________<wbr>_________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_<wbr>FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=<wbr>vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">https://public.kitware.com/<wbr>mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>