GLX (
initialism
An acronym is a type of abbreviation consisting of a phrase whose only pronounced elements are the initial letters or initial sounds of words inside that phrase. Acronyms are often spelled with the initial letter of each word in all caps wi ...
for "OpenGL Extension to the X Window System") is an extension to the
X Window System core protocol
The X Window System core protocolRobert W. Scheifler and James Gettys: ''X Window System: Core and extension protocols, X version 11, releases 6 and 6.1'', Digital Press 1996, RFC 1013Grant EdwardsAn Introduction to X11 User Interfaces is the base ...
providing an
interface between
OpenGL
OpenGL (Open Graphics Library) is a Language-independent specification, cross-language, cross-platform application programming interface (API) for rendering 2D computer graphics, 2D and 3D computer graphics, 3D vector graphics. The API is typic ...
and the
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
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.
History
Silicon Graphics
Silicon Graphics, Inc. (stylized as SiliconGraphics before 1999, later rebranded SGI, historically known as Silicon Graphics Computer Systems or SGCS) was an American high-performance computing manufacturer, producing computer hardware and soft ...
developed GLX as part of their effort to support OpenGL in the
X Window System
The X Window System (X11, or simply X) is a windowing system for bitmap displays, common on Unix-like operating systems.
X originated as part of Project Athena at Massachusetts Institute of Technology (MIT) in 1984. The X protocol has been at ...
. In 1999 SGI released GLX under an
open-source license
Open-source licenses are software licenses that allow content to be used, modified, and shared. They facilitate free and open-source software (FOSS) development. Intellectual property (IP) laws restrict the modification and sharing of creative ...
, letting it be incorporated in
XFree86
XFree86 is an implementation of the X Window System. It was originally written for Unix-like operating systems on IBM PC compatibles and was available for many other operating systems and platforms. It is free software, free and Open-source softw ...
source code version 4.0 in 2000. From there, the code was inherited by the forked
X.Org Foundation version of the X Window System X11R6.7.0. On September 19, 2008, SGI created a new SGI FreeB License Version 2.0, which "now mirrors the free X11 license used by X.Org" and "meets the free and open source software community's widely accepted definition of 'free'". In 2009 the
Free Software Foundation
The Free Software Foundation (FSF) is a 501(c)(3) non-profit organization founded by Richard Stallman on October 4, 1985. The organisation supports the free software movement, with the organization's preference for software being distributed ...
endorsed the SGI Free License B to be a
free-software license
A free-software license is a notice that grants the recipient of a piece of software extensive rights to modify and software distribution, redistribute that software. These actions are usually prohibited by copyright law, but the rights-holde ...
, and GLX to be an important
free-software
Free software, libre software, libreware sometimes known as freedom-respecting software is computer software distributed under terms that allow users to run the software for any purpose as well as to study, change, distribute it and any adapted ...
graphics project. As of 2011, GLX has reached version 1.4.
The first internal implementation of GLX API, called GLcore, loaded a version of the software renderer of
Mesa
A mesa is an isolated, flat-topped elevation, ridge, or hill, bounded from all sides by steep escarpments and standing distinctly above a surrounding plain. Mesas consist of flat-lying soft sedimentary rocks, such as shales, capped by a ...
inside the X server and rendered the OpenGL commands in a window or pixmap. With the development of
DRI, the ability to use hardware accelerated OpenGL through direct contexts was added (primarily used by
videogame
A video game or computer game is an electronic game that involves interaction with a user interface or input device (such as a joystick, controller, keyboard, or motion sensing device) to generate visual feedback from a display device, most ...
s). In 2006, the popularization of the nested
Xgl X server and
Compiz
Compiz () is a compositing window manager for the X Window System, using 3D graphics hardware to create fast compositing desktop effects for window management. Effects, such as a minimization animation or a cube workspace, are implemented as loa ...
compositing window manager
A compositing manager, or compositor, is software that provides applications with an off-screen data buffer, buffer for each window, then Compositing, composites these window buffers into an image representing the screen and writes the result into ...
lead to the development of Accelerated Indirect GLX (
AIGLX). AIGLX brings hardware acceleration to the GLX (indirect context) applications by loading the Mesa DRI driver inside the X server. This method enables the sharing of GL objects between X clients using indirect contexts (they all are in the same address space in the X server) and also between a X client and the compositing window manager, thus accelerating composition. In 2008 the binding in GLcore to the Mesa software renderer was rewritten as a DRI interface module, called
swrast_dri.so
, improving the coupling of Mesa and the X server. Also in the year 2008 the new DRI2 was introduced to replace DRI, and with it a new model based in the
Kernel mode-setting. In 2011, the
Glamor project started, aiming to add a generic hardware-accelerated 2D X driver based in OpenGL. In 2013 Adam Jackson did a major rewrite of GLX code to consolidate the diverse paths from Glamor, indirect rendering, ... to one unique path to OpenGL's library libGL.
File:Linux graphics drivers 2D.svg, 2D drivers inside of the X server X server may refer to:
* a display server for the X Window System
* X.Org Server, the X.Org Foundation's display server for the X Window System
* HPE Integrity Superdome X Server, a line of HPE Integrity Servers
HPE Integrity Servers is a ser ...
File:Linux graphics drivers Utah GLX.svg, Indirect rendering over GLX, using Utah GLX
File:Linux graphics drivers DRI early.svg, Early Direct Rendering Infrastructure
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 ...
File:Linux graphics drivers DRI current.svg, Finally all access goes through the Direct Rendering Manager
The Direct Rendering Manager (DRM) is a subsystem of the Linux kernel responsible for interfacing with Graphics processing unit, GPUs of modern video cards. DRM exposes an Application programming interface, API that user-space programs can use t ...
File:Linux graphics drivers DRI Wayland.svg, In Linux kernel 3.12 ''render nodes'' were merged and the KMS was split off. Wayland implements direct rendering over EGL
Features

GLX consists of three parts:
# An
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
that provides OpenGL functions to an X Window System application.
# An extension of the X protocol, which allows the client (the OpenGL application) to send 3D rendering commands to the X server (the software responsible for the display). The client and server software may run on different computers.
# An extension of the X server that receives the rendering commands from the client and passes them on to the installed OpenGL library
If client and server are running on the same computer and an accelerated 3D graphics card using a suitable driver is available, the former two components can be bypassed by
DRI. In this case, the client application is then allowed to directly access the video hardware through several API layers.
Implementations
*
Mesa 3D
Mesa, also called Mesa3D and The Mesa 3D Graphics Library, is an open-source software, open source implementation of OpenGL, Vulkan, and other graphics API specifications. Mesa translates these specifications to vendor-specific graphics hardware ...
– a
free and open-source
Free and open-source software (FOSS) is software available under a Software license, license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term ...
library
A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
which implements a couple of graphical APIs and also the available
Free and open-source device drivers: graphics; for a last resort Mesa 3D also offers fallback
software rendering
Software consists of computer programs that instruct the execution of a computer. Software also includes design documents and specifications.
The history of software is closely tied to the development of digital computers in the mid-20th cen ...
.
* The proprietary device drivers for graphics chips also include an implementation of GLX.
See also
*
WGL – the equivalent
Microsoft Windows
Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
interface to OpenGL
*
CGL – the equivalent
macOS
macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
interface to OpenGL
*
EGL – a similar cross-platform interface between OpenGL ES or VG and the underlying native platform window system
*
GLUT – library of utilities for OpenGL programs
References
External links
OpenGL® Graphics with the X Window System®*
Current OpenGL API, OpenGL Shading Language and GLX Specifications and Reference Pages
{{XWinSys
OpenGL
X Window extensions
X-based libraries