We have a java application in which we are trying to utilize vtk. I have created a fairly simply MPR vtk pipeline using vtkImageResliceMapper and everything seems to work fine when I have just a single window using this pipeline, however, when I subsequently create a second window (i.e. viewport - not a vtk viewport) I get the following error msg when triggering a render request (around 90 of this same error msg happens all at once):
2025-08-31 15:58:15.551 ( 20.686s) [A9661B54375E57F9]vtkWin32OpenGLRenderWin:252 ERR| vtkWin32OpenGLRenderWindow (000001F439647E40): wglMakeCurrent failed in MakeCurrent(), error: The handle is invalid.(code 6)
The image seems to display ok and I am able to interact with it initially. We typically will create up to 4 of these viewports (standard 4 MPR views) and add some point, one or more of those viewports will just go blank when interacting with it. Each of these viewports has its own vtkRenderWindowPanel and related vtk objects. The only thing shared between them is the same vtkImageData object used as input. There is no additional error displayed when the viewport(s) go blank but I have no doubt it is related to the above error messages.
When having multiple vtkRenderWindowPanel’s in the same application, is there any sort of coordination that is required between them? Any idea of why those error messages are showing up? Any help would be greatly appreciated.