0
\$\begingroup\$

I've implemented a clipping and capping view similar to the example called "simplecap.zip" in this page:

http://users.polytech.unice.fr/~buffa/cours/synthese_image/DOCS/trant.sgi.com/opengl/examples/more_samples/more_samples.html

enter image description here

This uses the stencil buffer to find the pixels drawn from inside the shape and fill them with a plane.

I'm not looking for a way to outline the clipping cap with a constant width line.

enter image description here

Obviously I can't just draw it since the clipping polygon is not actual geometry that I have. I've tried coming up with some more stencil buffer magic but couldn't figure out how to do it

\$\endgroup\$
  • \$\begingroup\$ this is mean you want to draw yellow line where stencil clipped? can you extrude stencil mask? so if it's possible you can extrude it then render result as yellow line \$\endgroup\$ – Seyed Morteza Kamali Dec 28 '18 at 19:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.