It appears that current (checked until VTK 9.3.1) OpenGLContext2D implementation is not stencil capable, despite setting StencilCapableON
.
The issue lies (at least) inside vtkOpenGLFramebufferObject.cxx
, where buffer attachment is made with GL_DEPTH_ATTACHMENT
, where it should be GL_DEPTH_STENCIL_ATTACHMENT
when StencilCapableON
.