X server settings
To allow GL applications run from a remote server via X protocol, one might need to add the following to the local X server configuration:
Section "ServerFlags" Option "IndirectGLX" "on" EndSection
On the modern Linux systems the appropriate place for these lines would be some file in the /etc/X11/xorg.conf.d/ directory, for instance, /etc/X11/xorg.conf.d/glxsettings.conf.
The receipt seems to help sometimes for proprietary NVidia drivers.
Another workaround is to use x2go. Run a terminal at remote server using x2goclient. Then, set a variable:
Run your GL application from the terminal.