Unfortunately I couldn’t find any examples. I just proposed a starting point. Hence the “my two cents”. Changing the default alpha blending behavior written in VTK without getting into the bowels of OpenGL likely involves writing a custom shader.
Anyway, if you’re familiar with OpenGL, you can study the class vtkOpenGLState
(https://vtk.org/doc/nightly/html/classvtkOpenGLState.html#details) to manage the OpenGL context between VTK calls. The OpenGL state is managed by carefully scoping the objects so the state is restored once they go out of scope, thus making it less likely to break VTK innards:
(...) //VTK calls unaffected by state change.
{
vtkOpenGLState *ostate = renWin->GetState();
vtkOpenGLState::ScopedglDepthMask dmsaved(ostate); // the prior state is now saved ...
ostate->glDepthMask(GL_TRUE); // change something
(...) //make VTK calls with modified OpenGL state.
} // prior state will be restored here as it goes out of scope
(...) //VTK calls unaffected by state change.
regards,
Paulo