Skip to content

Very preliminary linux support

David Thompson requested to merge dcthomp/vtk:vulkan into vulkan

First non-crashing linux build.

This does not render correctly (the window background is transparent) and doesn't respond to keyboard/mouse input but it doesn't immediately crash, either.

Code-wise, this MR:

  • Adds a new vtkXlibHardwareWindow.
    • This steals a bunch of code from vtkXOpenGLRenderWindow, but notably not all of the cursor or fullscreen stuff. It may not request an appropriate X11 visual.
    • Now vtkXRenderWindowInteractor attempts to get the X11 window ID from the vtkHardwareWindow (if one is set). It does not fetch the vtkHardwareWindow size (like the Win32 interactor this is cribbed from) but instead makes X11 calls to find the window size.
  • Adds a vtkRenderingUIConfigure.h header to match the OpenGL2 header so that the RenderingUI classes can check VTK_USE_X.
  • Requests the Xlib surface extension in vtkVulkanInstance if VTK_USE_X is defined.
  • Uses the string_VkResult() method to print more informative error messages.
  • The vtkVulkanWindowNode also checks VTK_USE_X and creates an Xlib surface if it is set.

Merge request reports