This documentation is about running OpenGL applications in an xpra session and this has nothing to do with the client's opengl acceleration.

By default, OpenGL applications are supported, but they are executed in a virtual framebuffer context which uses a software renderer, and therefore without any GPU acceleration.

# GPU Acceleration

To take advantage of GPU OpenGL acceleration, here are some options:

- ## VirtualGL

VirtualGL does API intercept and delegates OpenGL acceleration to a real GPU. Example:

    xpra start --start="vglrun glxgears"

Or even better:

    xpra start --exec-wrapper="vglrun" --start="glxgears"

That way, xpra will be able to detect the GPU actually used by `start` sub commands.

- ## via WSL - Windows Subsystem for Linux

See WSL - Windows Subsystem for Linux OpenGL acceleration.

- ## via Xwayland

From within an X11 session, you can use start the Weston Wayland compositor, then start Xwayland and the xpra server with the `-use-display` option:

    Xwayland :20 &
    xpra start :20 --use-display

(the Weston window can be hidden)

- ## Shadowing

If the GPU is driving an existing display, you can shadow it.
The limitation here is that the performance of shadow sessions is inferior to seamless and desktop sessions.

- ## Taking over an existing display

Similarly to the shadow solution, you can tell xpra to take over an existing X11 display and manage it for remote access using the `--use-display` flag:

    xpra start --use-display :0

The downside is that the session is no longer accessible from the local display.

# Caveats

## GL library conflicts

Proprietary graphics drivers can interfere with software OpenGL, glvnd can solve this issue by allowing multiple OpenGL libraries to co-exist.

## Stability

VirtualGL and Xwayland will tie the OpenGL application to a secondary context (X11 / Wayland server) and if this server is killed or restarted then the application will crash - this is no longer the case with the EGL backend in VirtualGL version 3.

## VirtualGL setup

Please refer to the extensive documentation.
Some applications may require workarounds, ie: 12: Using VirtualGL with setuid/setgid Executables .