Stencils?

Hello!



I’m porting an app from jme2 over to jme3. This app uses ortho mode with the stencil buffer to make, for all intents and purposes, nested windows. I’m looking around for some stencil based stuff in the jme3 codebase, and only find passing reference in TestMultiRenderTarget.



I was used to working with StencilState - is there a new equivalent?



Cheers!

You can use renderer.setClipRect() to achieve the same thing, assuming all your windows are rectangular. Also it will be faster.

Thanks for the tip. The windows I’m dealing with are rectangular, but they can (and mostly are) at arbitrary angles. I looked at code that uses this (RenderManager and niftygui’s RenderDeviceJme) and these instances suggest that setClipRect will not support rectangles at arbitrary rotations?

I dug a bit deeper - I see that this uses glScissor functions, so probably not what I can use. Any other approaches available?