Issues when using OSMesa + GLXMesa in same build
When using VTK (or ParaView) build with OSMesa and GLXMesa (Linux) enabled in the same build the following scenario causes issues:
- Create an onscreen render window. render something in it.
- Create an offscreen render window (i.e. SetUseOffscreen(true) before calling render). call
Render
. and then destroy this window. - Go back to window in 1 and trigger a render -- it raises errors.
What's happening is that vtkXOpenGLRenderWindow::MakeCurrent being called at start of render in Step 3 on Window #1 has no effect. It checks with glX to see if current context was different and does nothing if not. Step 2 never changed the glX context (it shouldn't since it was told to be offscreen and we have OS Mesa enabled). Hence Step 3 is triggering render in a bad context.