OpenGL Stencil

Hello,

I don’t know how you got the state object, but I’d advise to take a look at this: How to use original OpenGL in VTK program? - Support - VTK.

So you basically need to create a standalone OpenGL window and then pass its OpenGL context to VTK to use for rendering. The code example is in C++, then you’ll need to translate it to whatever you’re using.

best,

PC