VirtualGL

Last updated
VirtualGL
Stable release
2.6.5 / November 18, 2020;2 years ago (2020-11-18)
Preview release
2.6.90 (3.0 beta1) / June 16, 2021;2 years ago (2021-06-16)
Written in C, C++, Unix Shell
License GNU General Public License (GPL), wxWindows Library Licence
Website www.virtualgl.org

VirtualGL is an open-source software package that redirects the 3D rendering commands from Unix and Linux OpenGL applications to 3D accelerator hardware in a dedicated server and sends the rendered output to a (thin) client located elsewhere on the network. [1] On the server side, VirtualGL consists of a library that handles the redirection and a wrapper program that instructs applications to use this library. Clients can connect to the server either using a remote X11 connection or using an X11 proxy such as a VNC server. In case of an X11 connection some client-side VirtualGL software is also needed to receive the rendered graphics output separately from the X11 stream. In case of a VNC connection no specific client-side software is needed other than the VNC client itself.

Contents

Problem

The performance of OpenGL applications can be greatly improved by rendering the graphics on dedicated hardware accelerators that are typically present in a GPU. GPUs have become so commonplace that applications have come to rely on them for acceptable performance. But VNC and other thin client environments for Unix and Linux do not have access to such hardware on the server side. Therefore they either do not support OpenGL applications at all or resort to slower methods such as rendering on the client or in software on the server.

Remotely displaying 3D applications with hardware acceleration has traditionally required the use of "indirect rendering." Indirect rendering uses the GLX extension to the X Window System ("X11" or "X") to encapsulate the OpenGL commands inside of the X11 protocol stream and ship them from an application to an X display. Traditionally, the application runs on a remotely located application server, and the X display runs on the user's desktop. In this scenario, all of the OpenGL commands are executed by the user's desktop machine, so that machine must have a fast 3D graphics accelerator. This limits the type of machine that can remotely display a 3D application using this method.

Indirect rendering can perform well if the network is sufficiently fast (Gigabit Ethernet, for instance), if the application does not dynamically modify the geometry of the object being rendered, if the application uses display lists, and if the application does not use a great deal of texture mapping. Many OpenGL applications, however, do not meet these criteria. To further complicate matters, some OpenGL extensions do not work in an indirect rendering environment. Some of these extensions require the ability to directly access the 3D graphics hardware and thus can never be made to work indirectly. In other cases, the user's X display may not provide explicit support for a needed OpenGL extension, or the extension may rely on a specific hardware configuration that is not present on the user's desktop machine.

Performing OpenGL rendering on the application server circumvents the issues introduced by indirect rendering, since the application now has a fast and direct path to the 3D rendering hardware. If the 3D rendering occurs on the application server, then only the resulting 2D images must be sent to the client. Images can be delivered at the same frame rate regardless of how big the 3D data was that was used to generate them, so performing 3D rendering on the application server effectively converts the 3D performance problem into a 2D performance problem. The problem then becomes how to stream 1-2 megapixels of image data over a network at interactive frame rates, but commodity technologies (HDTV, to name one) already address this problem.

VirtualGL's solution

VirtualGL uses "GLX forking" to perform OpenGL rendering on the application server. Unix and Linux OpenGL applications normally send both GLX commands and ordinary X11 commands to the same X display. The GLX commands are used to bind OpenGL rendering contexts to a particular X window, obtain a list of pixel formats that the X display supports, etc. VirtualGL takes advantage of a feature in Unix and Linux that allows one to "preload" a library into an application, effectively intercepting (AKA "interposing") certain function calls that the application would normally make to shared libraries with which it is linked. Once VirtualGL is preloaded into a Unix or Linux OpenGL application, it intercepts the GLX function calls from the application and rewrites them such that the corresponding GLX commands are sent to the application server's X display (the "3D X Server"), which presumably has a 3D hardware accelerator attached. Thus, VirtualGL prevents GLX commands from being sent over the network to the user's X display or to a virtual X display ("X proxy"), such as VNC, that does not support GLX. In the process of rewriting the GLX calls, VirtualGL also redirects the OpenGL rendering into off-screen pixel buffers ("Pbuffers.") Meanwhile, the rest of the function calls from the application, including the ordinary X11 commands used to draw the application's user interface, are allowed to pass through VirtualGL without modification.

Internally, VirtualGL's interposer engine also maintains a map of windows to Pbuffers, matches visual attributes between the destination X display (the "2D X Server") and the 3D X Server, and performs a variety of other hashing functions to assure that the GLX redirection is seamless. But essentially, once the OpenGL context is established on the application server's X display, VirtualGL gets out of the way and allows all subsequent OpenGL commands to pass through unimpeded to the application server's 3D hardware. Thus, the application can automatically use whatever OpenGL features and extensions are provided by the application server's hardware and drivers.

Apart from marshaling GLX commands and managing Pbuffers, VirtualGL also reads back the rendered pixels at the appropriate time (usually by monitoring glXSwapBuffers() or glFinish()) and then draws those pixels into application's X window using standard X image drawing commands. Since VirtualGL is redirecting the GLX commands away from the 2D X Server, it can be used to add accelerated 3D support to X proxies (such as VNC) as well as to prevent indirect OpenGL rendering from occurring when using a remote X display.

When using the X11 Transport with an X proxy, both the 3D and 2D rendering occur on the application server. VirtualGL reroutes the 3D commands from the application to the 3D accelerator hardware, reads back the rendered images, and draws them as a series of uncompressed bitmaps into the X proxy (VNC or a similar system.) Meanwhile, the 2D drawing commands (X11 commands) from the application are sent to the X proxy directly. The X proxy is solely responsible for compressing the images and sending them to remote clients. X11transport.png
When using the X11 Transport with an X proxy, both the 3D and 2D rendering occur on the application server. VirtualGL reroutes the 3D commands from the application to the 3D accelerator hardware, reads back the rendered images, and draws them as a series of uncompressed bitmaps into the X proxy (VNC or a similar system.) Meanwhile, the 2D drawing commands (X11 commands) from the application are sent to the X proxy directly. The X proxy is solely responsible for compressing the images and sending them to remote clients.

Using VirtualGL in concert with VNC or another X proxy allows multiple users to simultaneously run 3D applications on a single application server and multiple clients to share each session. However, VNC and its ilk are tuned to handle 2D applications with large areas of solid color, few colors, and few inter-frame differences. 3D applications, on the other hand, generate images with fine-grained, complex color patterns and much less correlation between subsequent frames. The workload generated by drawing rendered images from an OpenGL application into an X window is essentially the same workload as a video player, and off-the-shelf thin client software typically lacks sufficiently fast image codecs to be able to handle this workload with interactive frame rates.

VirtualGL works around this problem in two ways:

  1. TurboVNC
  2. The VGL Transport

TurboVNC and TigerVNC

TurboVNC and TigerVNC are offshoots of TightVNC that accelerate the Tight and JPEG encoding, in part by using libjpeg-turbo, a SIMD-accelerated version of libjpeg. Both projects provide VNC servers as well as client applications.

TurboVNC was developed by the same team as VirtualGL. On 100 Megabit Ethernet networks it can display more than 50 Megapixels/second with perceptually lossless image quality. TurboVNC includes further optimizations that allow it to display 10–12 Megapixels/second over a 5 Megabit broadband link, with noticeably less but usable image quality. TurboVNC also extends TightVNC to include client-side double buffering and other features targeted at 3D applications, such as the ability to send a lossless copy of the screen image during periods of inactivity. [2] TurboVNC and VirtualGL are used by the Texas Advanced Computing Center at University of Texas at Austin to allow users of TeraGrid to remotely access the 3D rendering capabilities of the Stampede [3] Visualization Cluster.

TigerVNC is a more recent fork of TightVNC that provides similar performance to TurboVNC in most cases but has different project goals and features. [4] [5]


VGL Transport

When using the VGL Transport, the 3D rendering occurs on the application server, but the 2D rendering occurs on the client machine. VirtualGL compresses the rendered images from the 3D application and sends them as a video stream to the client, which decompresses and displays the video stream in real time. VGLtransport.png
When using the VGL Transport, the 3D rendering occurs on the application server, but the 2D rendering occurs on the client machine. VirtualGL compresses the rendered images from the 3D application and sends them as a video stream to the client, which decompresses and displays the video stream in real time.

When using the VGL Transport, VirtualGL compresses the rendered 3D images in process using the same optimized JPEG codec that TurboVNC uses. VirtualGL then sends the compressed images over a dedicated TCP socket to a VirtualGL Client application running on the client machine. The VirtualGL Client is responsible for decompressing the images and drawing the pixels into the appropriate X window. Meanwhile, the non-OpenGL elements of the application's display are sent over the network using the standard remote X11 protocol and rendered on the client machine.

This approach requires that an X display be present on the client machine, and the reliance upon the remote X11 protocol for performing 2D rendering means that many applications will perform poorly when using the VGL Transport on high-latency networks. Additionally, the VGL Transport does not inherently support collaboration (multiple clients per session), since the images are being pushed to the users' machines rather than being pulled. But the use of the VGL Transport does provide a completely seamless application experience, whereby every application window corresponds to a single desktop window. The VGL Transport also reduces the server CPU load, since the 2D rendering is occurring on the client, and the VGL Transport allows advanced OpenGL features, such as quad-buffered stereo, to be used.

The developers of VirtualGL envision the primary users of the VGL Transport to be laptop users with an 802.11g wireless or a fast Ethernet connection to the application server.

Commercial products using VirtualGL

VirtualGL and TurboVNC were core components of the Sun Visualization System product from Sun Microsystems, which was discontinued in April 2009. The two open source packages were combined with a closed source plugin that allowed VirtualGL to send compressed images to Sun Ray thin clients and another closed source package that integrated VirtualGL with Sun Grid Engine, providing resource management and scheduling for remote 3D jobs. The combination of these packages, dubbed "Sun Shared Visualization", was available as a free download. Sun charged for support.

v4.x.x of NoMachine supports VirtualGL to allow users to run 3D applications in NoMachine desktop sessions. [6]

v2.1 of the Scalable Visualization Array software from HP includes components that integrate with VirtualGL and TurboVNC, allowing 3D jobs to be scheduled on and remotely displayed from a visualization cluster. [7]

v3.0.0 of ThinLinc is designed to work in conjunction with VirtualGL. [8]

v2010 of EnginFrame Views supports VirtualGL as one of the remote protocol options. [9]

The Exceed onDemand and Exceed Freedom products from OpenText use code from VirtualGL to implement server-side rendering. [10]

See also

Related Research Articles

<span class="mw-page-title-main">Thin client</span> Non-powerful computer optimized for remote server access

In computer networking, a thin client is a simple (low-performance) computer that has been optimized for establishing a remote connection with a server-based computing environment. They are sometimes known as network computers, or in their simplest form as zero clients. The server does most of the work, which can include launching software programs, performing calculations, and storing data. This contrasts with a rich client or a conventional personal computer; the former is also intended for working in a client–server model but has significant local processing power, while the latter aims to perform its function mostly locally.

<span class="mw-page-title-main">X Window System</span> Windowing system for bitmap displays on UNIX-like systems

The X Window System is a windowing system for bitmap displays, common on Unix-like operating systems.

<span class="mw-page-title-main">Windowing system</span> Software that manages separately different parts of display screens

In computing, a windowing system is a software suite that manages separately different parts of display screens. It is a type of graphical user interface (GUI) which implements the WIMP paradigm for a user interface.

<span class="mw-page-title-main">Virtual Network Computing</span> Graphical desktop-sharing system

Virtual Network Computing (VNC) is a graphical desktop-sharing system that uses the Remote Frame Buffer protocol (RFB) to remotely control another computer. It transmits the keyboard and mouse input from one computer to another, relaying the graphical-screen updates, over a network.

X.Org Server is the free and open-source implementation of the X Window System display server stewarded by the X.Org Foundation.

TightVNC is a free and open-source remote desktop software server and client application for Linux and Windows. A server for macOS is available under a commercial source code license only, without SDK or binary version provided. Constantin Kaplinsky developed TightVNC, using and extending the RFB protocol of Virtual Network Computing (VNC) to allow end-users to control another computer's screen remotely.

GLX is an extension to the X Window System core protocol providing an interface between OpenGL and the X Window System as well as extensions to OpenGL itself. It enables programs wishing to use OpenGL to do so within a window provided by the X Window System. GLX distinguishes two "states": indirect state and direct state.

<span class="mw-page-title-main">Xinerama</span>

Xinerama is an extension to the X Window System that enables X applications and window managers to use two or more physical displays as one large virtual display.

<span class="mw-page-title-main">Direct Rendering Infrastructure</span> Framework

The Direct Rendering Infrastructure (DRI) is the framework comprising the modern Linux graphics stack which allows unprivileged user-space programs to issue commands to graphics hardware without conflicting with other programs. The main use of DRI is to provide hardware acceleration for the Mesa implementation of OpenGL. DRI has also been adapted to provide OpenGL acceleration on a framebuffer console without a display server running.

x11vnc is a Virtual Network Computing (VNC) server program. It allows remote access from a remote client to a computer hosting an X Window session and the x11vnc software, continuously polling the X server's frame buffer for changes. This allows the user to control their X11 desktop from a remote computer either on the user's own network, or from over the Internet as if the user were sitting in front of it. x11vnc can also poll non-X11 frame buffer devices, such as webcams or TV tuner cards, iPAQ, Neuros OSD, the Linux console, and the Mac OS X graphics display. x11vnc is part of the LibVNCServer project and is free software available under the GNU General Public License. x11vnc was written by Karl Runge.

<span class="mw-page-title-main">Xgl</span> Display server implementation

Xgl is an obsolete display server implementation supporting the X Window System protocol designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL. It supports hardware acceleration of all X, OpenGL and XVideo applications and graphical effects by a compositing window manager such as Compiz or Beryl. The project was started by David Reveman of Novell and first released on January 2, 2006. It was removed from the X.org server in favor of AIGLX on June 12, 2008.

Xvfb or X virtual framebuffer is a display server implementing the X11 display server protocol. In contrast to other display servers, Xvfb performs all graphical operations in virtual memory without showing any screen output. From the point of view of the client, it acts exactly like any other X display server, serving requests and sending events and errors as appropriate. However, no output is shown. This virtual server does not require the computer it is running on to have any kind of graphics adapter, a screen or any input device. Only a network layer is necessary.

<span class="mw-page-title-main">AIGLX</span> Open source project

Accelerated Indirect GLX ("AIGLX") is an open source project founded by Red Hat and the Fedora community, led by Kristian Høgsberg, to allow accelerated indirect GLX rendering capabilities to the X.Org Server and DRI drivers. This allows remote X clients to get fully hardware accelerated rendering over the GLX protocol; coincidentally, this development was required for OpenGL compositing window managers to function with hardware acceleration.

Core OpenGL, or CGL, is Apple Inc.'s Macintosh Quartz windowing system interface to the OS X implementation of the OpenGL specification. CGL is analogous to GLX, which is the X11 interface to OpenGL, as well as WGL, which is the Microsoft Windows interface to OpenGL.

<span class="mw-page-title-main">Video wall</span> Technique used for creating large video displays, without a video projector

A video wall is a special multi-monitor setup that consists of multiple computer monitors, video projectors, or television sets tiled together contiguously or overlapped in order to form one large screen. Typical display technologies include LCD panels, Direct View LED arrays, blended projection screens, Laser Phosphor Displays, and rear projection cubes. Jumbotron technology was also previously used. Diamond Vision was historically similar to Jumbotron in that they both used cathode-ray tube (CRT) technology, but with slight differences between the two. Early Diamond vision displays used separate flood gun CRTs, one per subpixel. Later Diamond vision displays and all Jumbotrons used field-replaceable modules containing several flood gun CRTs each, one per subpixel, that had common connections shared across all CRTs in a module; the module was connected through a single weather-sealed connector.

This page is a comparison of notable remote desktop software available for various platforms.

<span class="mw-page-title-main">ThinLinc</span>

ThinLinc is a cross-platform remote desktop server developed by Cendio AB. The server software and the users' main desktops run on Linux. Clients are available for Linux, Windows, macOS, and a number of thin clients. A browser client using HTML5 technologies is also available.

Sun Visualization System was a sharable visualization product introduced by Sun Microsystems in January 2007. It used other Sun technologies, including Sun servers, Solaris, Sun Ray Ultra-Thin Clients, and Sun Grid Engine. The Sun Visualization System software was based on several open source technologies: Chromium to perform distributed 3D rendering, VirtualGL to re-route 3D rendering jobs to arbitrary graphics devices, and TurboVNC to deliver the rendered 3D images to a client or clients. Sun sponsored and/or contributed changes back to these projects throughout the life of the Sun Visualization System.

<span class="mw-page-title-main">Remote Graphics Software</span> Remote desktop software

HP ZCentral Remote Boost, formerly known as HP Remote Graphics Software or HP RGS is a client-server remote desktop software developed by HP Inc. and initially launched in 2003. HP RGS enables remote access to high-performance workstations from many different devices including other Workstations, PCs, Windows tablets, MacBooks and thin-clients. The software is targeted at remote access to graphic intensive applications, Video editing and complex 3D models. Collaboration, or screen sharing, between multiple users, remote USB and sound, as well as Windows and Linux are also supported. HP markets RGS for "Real-Time Collaboration", "Workstation-Class Mobility" and "Remote Workers"

References

Footnotes

  1. "A Brief Introduction to VirtualGL". VirtualGL.org. Retrieved 20 February 2016.
  2. "A Brief Introduction to TurboVNC". TurboVNC.org. Retrieved 20 February 2016.
  3. "Stampede User Guide". Texas Advanced Computing Center (TACC). Retrieved 29 February 2016.
  4. "VirtualGL". ArchLinux.org. Retrieved 25 June 2021.
  5. "What About TigerVNC?". The VirtualGL Project. Retrieved 7 Aug 2023.
  6. "Enabling VirtualGL support in NoMachine 4 or later". NoMachine.com. Retrieved 20 February 2016.
  7. "High Performance Computing (HPC)". Hp.com. Archived from the original on 9 August 2014. Retrieved 17 February 2015.
  8. "ThinLinc Administrator's Guide for ThinLinc 4.5.0". ThinLinc.com. Retrieved 20 February 2016.
  9. "Remote Visualization". Nice-software.com. Archived from the original on 7 December 2010. Retrieved 17 February 2015.
  10. "Open Text Exceed User's Guide, Version 14" (PDF). Kb.berkeley.edu. June 12, 2012. Archived from the original (PDF) on June 15, 2010. Retrieved June 12, 2012.

General references