Ssh – Remote direct rendering for GLX (OpenGL)

openglssh

I am trying to run an OpenGL 2.1+ application over SSH.

[my computer] — ssh connection — [remote machine] (application)

I use X forwarding to run this application and with that in mind I think there are a couple of ways for this application to do 3D graphics:

  1. Using LIBGL_ALWAYS_INDIRECT, the graphics hardware on my computer can be used. According to this post this is generally limited to OpenGL version 1.4.
  2. Using Mesa software rendering on the remote machine. This supports higher versions of OpenGL, but uses the CPU.

However, in my case the remote machine has a decent graphics card. So rather than software rendering, I was wondering if it could do hardware rendering remotely instead.

Also, if there is another way to use my machine's graphics card that would be great too.

Best Answer

The choice is not necessarily between indirect rendering and software rendering, but more precisely between direct and indirect rendering. Direct rendering will be done on the X client (the remote machine), then rendering results will be transferred to X server for display. Indirect rendering will transmit GL commands to the X server, where those commands will be rendered using server's hardware. Since you want to use the 3D hardware on the remote machine, you should go with direct rendering (and accept overhead of transmitting rendered raster image over the network).

If you application cannot live with OpenGL 1.4, direct rendering is your only option.

Related Question