Xgl

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Rich Farmbrough (talk | contribs) at 11:56, 10 September 2006 (External links: Wikify date(s) from xx/xx/xxx format.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Jump to navigation Jump to search
Cube view on a hardware accelerated Xgl server

Xgl is an X server architecture designed to take advantage of modern graphics cards via their OpenGL drivers, layered on top of OpenGL via glitz. It supports hardware acceleration of all X, OpenGL and XVideo applications and graphical effects by a compositing window manager such as Compiz. The project was started by David Reveman and first released on January 2, 2006.

History

Xgl was originally developed on public mailing lists, but for a long time, until January 2 2006 most [1] development of Xgl was done behind closed doors. On that day the source to Xgl was re-opened to the public [2] [3], and included in freedesktop.org, along with major restructuring to allow a wider range of supported display drivers. X server backends used by Xgl include Xglx and Xegl. In February 2006 the server gained wide publicity after a public display where the Novell desktop team demonstrated a desktop using Xgl with several visual effects such as translucent windows and a rotating 3D desktop. [4] [5] [6] The effects had first been implemented in a composite manager called glxcompmgr (not to be confused with xcompmgr), now deprecated because several effects could not be adequately implemented without tighter interaction between the window manager and the composite manager. As a solution David Reveman developed Compiz, the first proper OpenGL compositing window manager for the X Window System as well. [7]

Backends

OpenGL does not specify how to initialize a display and manipulate drawing contexts. Instead these operations are handled by an API specific to the native windowing system. So far there are two different backend approaches to solving this initialization problem. Most likely the majority of each backend will contain the same code and the differences will primarily be in the initialization portions of the servers.

Xglx

Xglx was the first backend implemented for this architecture. It is also the one where the majority of development takes place at the moment. It requires an already existing X server to run on top of and uses GLX to create an OpenGL window which Xgl then uses, similar to Xnest. This mode is only intended to be used for development in the future, as it is redundant to require an X server to run Xgl on top of. At XDevConf 2006 NVIDIA did a presentation arguing this is the wrong direction to take because the layered server abstracts features of the cards away. This makes driver specific capabilities like support for 3D glasses and dual monitor support much more difficult [8] (PDF). However, delegating initialization to an existing X server allows the developers to immediately focus on server functionality rather than dedicating substantial time to specifics of interfacing with numerous video hardware. At the moment, Xglx does not officially support multiple monitors, although it has been achieved on Ubuntu Dapper / ATI / NVIDIA (twinview).

Xegl

Xegl is the future of Xgl and a long term goal of X server development. The Xegl server will share much of the drawing code with the Xglx server, except that the initialization of the OpenGL drawable and context management is handled by the Embedded GL specification, referred to as EGL API. The current implementation uses Mesa-solo to provide OpenGL rendering directly to the Linux framebuffer or DRI to the graphics hardware. As of August 2005 Xegl can only be run using Radeon R200 graphics hardware and development has currently been delayed. It is likely that it will remain so until the Xglx server has proven itself and the closed source drivers add support for the EGL API, in which case it should be a transparent replacement for the nested Xglx server.

Rationale

Structuring all rendering on top of OpenGL could potentially simplify video driver development. It removes the artificial separation of 2D and 3D acceleration. This is advantageous as 2D operations are frequently (and counterintuitively, since 3D would imply 2D) unaccelerated. It also removes all driver-dependent code from the X server itself, and allows for accelerated Compose and Render operations independent of the graphics driver. Additionally, composite managers can use the OpenGL API for rendering, allowing for quite amazing effects. It has been reported that affiliates from NVIDIA and ATI are willing to release binary-only drivers for an OpenGL-based X server once a defined API has been established, though on the Xorg Developers Conference 2006 it was indicated by NVIDIA that they are quite happy with the existing driver interface as well. The idea of extending this is being worked on in the AIGLX project by the Fedora Project. [9]

Competitors

Hardware-accelerated OpenGL window and desktop rendering, limited to using OpenGL for texture composition, has been in use in Mac OS X, in a technology called Quartz Extreme, since Mac OS X v10.2. Quartz 2D Extreme is an enhancement of this feature and more directly comparable to Xgl. Like Xgl, Quartz 2D Extreme brings OpenGL acceleration to all 2D drawing operations (not just desktop compositing) and ships with Mac OS X v10.4, but is disabled by default pending a formal declaration of production-readiness. The very pioneer seems to be Sun Microsystems when researching this kind of features on a GUI, on a project named Project Looking Glass [10].

Microsoft is in active development of a similar technology based on DirectX, named the DWM, as part of its upcoming operating system Windows Vista.

Controversy

Xgl technology requires good OpenGL performance, along with several unique features of recent 3D cards, and for the most part these can only be accessed using binary-only (proprietary) kernel modules for ATI and NVIDIA cards (technically the drivers use a binary-only component coupled to open source code elsewhere). There are some open source drivers for these cards but they allow 2D only, or allow primitive OpenGL 3D capabilities. Currently this is a deadlock situation because graphics card manufacturers have stated they have no intention to sponsor fully open source drivers. Intel, though, has recently announced that they will open source their drivers [11], beginning with the Intel 965 Express Chipset. This is a milestone in driver development for Linux, others (ATI, NVIDIA) might pick up the same route.

Availability

As of May 2006, the Xgl X Server (and related components including the Compiz compositing manager and associated graphical config tools) ships as a non-default in one major Linux distribution, SUSE 10.1, and is included in Frugalware Linux. Xgl can be set up fairly easily for Ubuntu 6.06 (Dapper) with binary packages from unofficial repositories. Xgl is also available as an overlayed package in Gentoo Linux. There is also a PKGBUILD for Arch Linux available. The Mandriva betas of Mandriva Linux 2007 also have Compiz , Xgl and AIGLX configurable through drak3d.

See also