The Puzzle of 3-D Graphics on Linux
The Direct Rendering Infrastructure (DRI) is a technology developed by Precision Insight to add a direct rendering ability to an X server. In more common terms, DRI allows applications to safely and efficiently access the hardware directly while cooperating with the X server. Unlike Utah-GLX, it doesn't require privileged users or privileged programs. Furthermore, the work takes place in the application instead of in the X server.
More technically, one can think of DRI as three parts: a special X server, a direct rendering client and a kernel-level device driver. The special X server for Linux is XFree86 4.0, whose code contains special DRI modifications. The direct rendering client consists of several smaller components. The most important of these are an OpenGL implementation (in most cases Mesa), GLX as developed by PI from SGI's code, and driver libraries from PI that are Linux-specific (but hardware-independent). The kernel-level device driver is a module that abstracts direct memory access for hardware. It is designed in such a way that only the minimum of kernel modification should be needed in the future.
In short, DRI is hardware acceleration “done right”. Since it doesn't require special programs or privileges, there is an inherent level of security which current hardware-acceleration implementations may not have. Also, it is part of the XFree86 server and has undergone a significant amount of testing. With such a development system, the hope is that users can count on the usual stability associated with XFree86. Finally, the direct access to hardware gives Linux and XFree86 the chance to act as a solid, fast platform for professional graphics applications and demanding 3-D games.
In addition to DRI, OpenGL, Mesa and the other terms, there are some smaller parts of the picture that you, faithful reader, are likely to have come across. Let's take a minute to go over each of them briefly.
GLUT began as a library called aux developed by Mark Kilgard (formerly of SGI, now at NVIDIA) to make programming examples easier in his book OpenGL Programming for the X Window System. This library was eventually improved and has matured into GLUT.
DGA is the direct graphics architecture. It is a very simple extension to the X server that allows applications to have direct access to the frame buffer. Users and applications need to have privileges to use DGA. With those permissions, they can get access to the frame buffer memory and draw, unaccelerated, on the screen. With the release of XFree86 4.0, DGA 2.0 will be included, bringing some hardware acceleration to basic 2-D drawing functions. In addition to the graphics abilities, DGA allows an application to read peripherals like the mouse and keyboard more directly. Normally, signals from those input devices pass through the X server before they can be used by an application.
VidMode—the vidmode extension allows an application to query the X server for the resolutions it supports and tell the X server to change to a specific resolution. This is often used in games that want to run at a specific size when your desktop is set to a different resolution.
Glide is the 3-D API developed by 3dfx for their Voodoo line of cards to provide fast, full-screen hardware acceleration. Its functionality was designed to match that of the Voodoo hardware 3dfx had created. Many early 3-D accelerated games, like Tomb Raider, used Glide. With the widespread acceptance of OpenGL for both productivity and entertainment applications, the importance of Glide has diminished. Consequently, 3dfx opted to release the source code and specifications to the public, a move which allowed its spread to other platforms.
Let's review: OpenGL is a library that facilitates the creation of 3-D graphics. Under Linux, there is an open-source library called Mesa which provides OpenGL compatibility. We have GLX to provide a standard way for OpenGL applications to work with X. For people still using XFree86 3.3.x and certain video cards, Utah-GLX provides some OpenGL functionality similar to the type that XFree86 4.0 and DRI provide. With XFree86 4.0, however, users get maximized 2-D and 3-D performance, better integration and more secure operation.
So there you have it. We can see how all the parts fit together and their dependencies upon one another.
|Omesh Tickoo and Ravi Iyer's Making Sense of Sensors (Apress)||Apr 21, 2017|
|Low Power Wireless: 6LoWPAN, IEEE802.15.4 and the Raspberry Pi||Apr 20, 2017|
|CodeLathe's Tonido Personal Cloud||Apr 19, 2017|
|Wrapping Up the Mars Lander||Apr 18, 2017|
|MultiTaction's MT Canvus-Connect||Apr 17, 2017|
|Android Candy: Facebook Everything?!?!||Apr 14, 2017|
- Low Power Wireless: 6LoWPAN, IEEE802.15.4 and the Raspberry Pi
- Teradici's Cloud Access Platform: "Plug & Play" Cloud for the Enterprise
- The Weather Outside Is Frightful (Or Is It?)
- Simple Server Hardening
- Understanding Firewalld in Multi-Zone Configurations
- Gordon H. Williams' Making Things Smart (Maker Media, Inc.)
- Bash Shell Script: Building a Better March Madness Bracket
- A Switch for Your RPi
- IGEL Universal Desktop Converter