Login  Register

Re: How do I use stencil textures for outlining shapes?

Posted by imakerobots on Jun 28, 2023; 10:23pm
URL: https://forum.jogamp.org/How-do-I-use-stencil-textures-for-outlining-shapes-tp4042652p4042717.html

Reddit turned me on to a method that is nearly what I want.

https://imgur.com/a/zWhKMoj

used the stencil buffer to mask some of it, then gl.glPolygonMode(GL.GL_FRONT_AND_BACK,GL3.GL_LINE); to render again with the given glLineWidth().

I still don't know how to render the stencil buffer out to a texture and I might one day revisit this because the line ends aren't as smooth as I'd like... but these are low priority.