Open jcfr opened 3 years ago
cc: @martinken
I'm taking a look now, just getting oriented in the code.
It may be worth looking into commenting the whole block: https://gitlab.kitware.com/vtk/vtk/-/blob/36f8256268614a24efcb6c5c90e6fcf7104b3ff9/Rendering/OpenGL2/vtkCocoaRenderWindow.mm#L821-845
That didn't do the trick I'm afraid.
In a quick test, I was able to create the window on the second display be choosing a different NSScreen
in OpenGL parlance. Now I just need to hook that into the render window creation.
@cquammen Even after building the latest version of VTK with the remote module, running TestDragon display the window on the main screen instead of the LG hardware. I am adding some debug statement to vtkCocoaLookingGlassRenderWindow.mm
to try to make sense of what the issue is.
Did you update the remote module SHA-1 in VTK before trying it? I haven't gotten around to updating the VTK SHA-1.
Did you update the remote module SHA-1 in VTK before trying it?
Let me try that.
I ended up building VTK directly because the updated code didn't work within Slicer. I will report back in a few.
Good news.
The TestDragon
test properly displays the window on the LG device. I now need to figure out what I need to fix on the Slicer side:
Due to an issue in upstream VTK preventing windows with negative position from being used, the looking glass renderwindow created on macOS does not appear on the hardware display but instead is shown on the main screen.
Similar problem has been fixed for Linux and Windows in https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7271 but we still need to address the problem with the underlying
Rendering/OpenGL2/vtkCocoaRenderWindow.mm
To test potential fixes, you may run the command line associated with "TestDragon" test and specify
-I
.I tried to comment these lines without success: https://gitlab.kitware.com/vtk/vtk/-/blob/36f8256268614a24efcb6c5c90e6fcf7104b3ff9/Rendering/OpenGL2/vtkCocoaRenderWindow.mm#L830-837
It may be worth looking into commenting the whole block: https://gitlab.kitware.com/vtk/vtk/-/blob/36f8256268614a24efcb6c5c90e6fcf7104b3ff9/Rendering/OpenGL2/vtkCocoaRenderWindow.mm#L821-845