GLX

Extension to the X Window System core protocol


title: "GLX" type: doc version: 1 created: 2026-02-28 author: "Wikipedia contributors" status: active scope: public tags: ["opengl", "x-window-extensions", "x-based-libraries"] description: "Extension to the X Window System core protocol" topic_path: "general/opengl" source: "https://en.wikipedia.org/wiki/GLX" license: "CC BY-SA 4.0" wikipedia_page_id: 0 wikipedia_revision_id: 0

::summary Extension to the X Window System core protocol ::

::data[format=table title="Infobox software"]

FieldValue
nameGLX
authorSGI
released1992
latest release version1.4
latest release dateDecember 16, 2005
programming languageC
licenseSGI FreeB License{{cite web
urlhttp://oss.sgi.com/projects/FreeB/
titleHistory and Most Recent Version of the SGI Free Software License B
date2012
authoross-project-owners
publisherSilicon Graphics International
access-date2017-04-11
archive-urlhttps://web.archive.org/web/20170420064437/http://oss.sgi.com/projects/FreeB/
archive-date2017-04-20
url-statusdead
website
::

| name = GLX | logo = | screenshot = | caption = | collapsible = | author = SGI | developer = | released = 1992 | latest release version = 1.4 | latest release date = December 16, 2005 | latest preview version = | latest preview date = | programming language = C | operating system = | platform = | size = | language = | status = | genre = | license = SGI FreeB License{{cite web | url=http://oss.sgi.com/projects/FreeB/ | title=History and Most Recent Version of the SGI Free Software License B | date=2012 | author=oss-project-owners | publisher=Silicon Graphics International | access-date=2017-04-11 | archive-url=https://web.archive.org/web/20170420064437/http://oss.sgi.com/projects/FreeB/ | archive-date=2017-04-20 | url-status=dead | website =
GLX (initialism for "OpenGL Extension to the X Window System") 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.

History

Silicon Graphics developed GLX as part of their effort to support OpenGL in the X Window System. In 1999 SGI released GLX under an open-source license,{{cite web | title=OpenGL Sample Implementation | url=http://oss.sgi.com/projects/ogl-sample/ | author=Jon Leech | date=2012 | publisher=Silicon Graphics International | access-date=2017-04-11 | archive-date=2011-05-14 | archive-url=https://web.archive.org/web/20110514113623/http://oss.sgi.com/projects/ogl-sample/ | url-status=dead | url=http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html | title=SGI Further Opens Its OpenGL Contributions | date=2008-09-19 | archive-url=https://web.archive.org/web/20120211122230/http://www.sgi.com/company_info/newsroom/press_releases/2008/september/opengl.html | archive-date=2012-02-11 | url-status=dead}} In 2009 the Free Software Foundation endorsed the SGI Free License B to be a free-software license, and GLX to be an important free-software graphics project.{{cite web | url=https://www.fsf.org/news/thank-you-sgi | title=Thank you SGI, for freeing the GNU/Linux 3D desktop! | first=Matt | last=Lee | date=2008-09-19 | publisher=Free Software Foundation | access-date=2017-04-11}}{{cite web | url=https://www.fsf.org/blogs/licensing/2009-01-xorg-glx | title=3D graphics are 100% free software | author=brett | date=2009-01-13 | publisher=Free Software Foundation | access-date=2017-04-11}} As of 2011, GLX has reached version 1.4.

The first internal implementation of GLX API, called GLcore,{{cite web | url=https://dri.freedesktop.org/wiki/GLcore/ | title=DRI – GLcore | date=2016-07-20 | publisher=freedesktop.org | access-date=2017-04-11}} loaded a version of the software renderer of Mesa 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 videogames). In 2006, the popularization of the nested Xgl X server and Compiz compositing window manager 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.{{cite web | url=https://www.youtube.com/watch?v=4Fr7pzoNSbQ |archive-url=https://ghostarchive.org/varchive/youtube/20211221/4Fr7pzoNSbQ |archive-date=2021-12-21 |url-status=live| title=Rewriting GLX To Rewrite X | last=Jackson | first=Adam | date=2014-02-04 | publisher=Linux.conf.au | access-date=2017-04-11}}

File:Linux graphics drivers 2D.svg|2D drivers inside of the X server 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 File:Linux graphics drivers DRI current.svg|Finally all access goes through the Direct Rendering Manager 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

::figure[src="https://upload.wikimedia.org/wikipedia/commons/6/62/Xf86_glxgears.png" caption="GLX demo (glxgears) included with X11"] ::

GLX consists of three parts:

  1. An API that provides OpenGL functions to an X Window System application.
  2. 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.
  3. 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

References

::callout[type=info title="Wikipedia Source"] This article was imported from Wikipedia and is available under the Creative Commons Attribution-ShareAlike 4.0 License. Content has been adapted to SurfDoc format. Original contributors can be found on the article history page. ::

openglx-window-extensionsx-based-libraries