The Puzzle of 3-D Graphics on Linux
Over the past year, there has been a drastic change in how Linux is viewed by gamers. No longer relegated to the role of just a dedicated server, gamers are using Linux in increasing numbers as their primary OS and as their gaming platform. And as if using Linux wasn't a challenge enough in itself, anyone trying to set up a Linux box to play a 3-D game will find the path fraught with a plethora of confusing acronyms and names. From OpenGL to DRI to DGA, each term refers to a particular part of the full scene of Linux graphics. Here we put those pieces together for our readers to give them a broader view of what Linux has to offer now and what it will offer, in the near future.
We start by looking at OpenGL, a name that's gotten a lot of use lately, especially in reference to games and professional design applications. Originally called IRIS GL, OpenGL (Open Graphics Library) is a programming library that provides a rich array of graphics functions, both 2-D and 3-D, allowing the programmer to represent any object they design on the screen. It was developed by Silicon Graphics (SGI) and has become a standard graphics application programming interface (API) on many platforms including UNIX, Linux, Microsoft Windows and Apple Macintosh. While OpenGL is the standard for high-end graphics applications where programmers have found it powerful and easy to use, most people have heard of OpenGL in reference to the Quake series of games from id Software. It has been used as part of the graphics renderer since Quake 1, where it has shown itself to be a powerful game graphics API as well. The standard for OpenGL is an open one, independent of hardware platforms, windowing systems and operating systems. Thus the word “Open” as part of the name.
In order for OpenGL to be used in an OS, someone must create a library to implement the function calls OpenGL programs make. However, to call your implementation by the name “OpenGL”, you must actually obtain a license from SGI (or Microsoft). In fact, getting a license will earn you a package of code, called a Sample Implementation and written in C, from which you can build your OpenGL library on your platform. But since the standard for OpenGL is an open one, working from the SI isn't required. In fact, that's what Mesa is all about: it is an implementation created from scratch without a license from SGI and without any code from SGI. To use the OpenGL trademark, however, you must get a license from SGI and your implementation must be robust enough to pass a set of conformance tests developed by the OpenGL Architecture Review Board (ARB). The ARB historically consisted primarily of high-end hardware manufacturers and SGI itself, but now includes some game hardware manufacturers. It is worth noting that, while SGI created OpenGL, the future of the API is controlled by the ARB where SGI sits as one of many members.
Recently, SGI released a Sample Implementation (SI) that can be used to implement the API on any hardware platform with an appropriate compiler. This source code is very similar to the one sold to hardware vendors that implement OpenGL drivers for their video cards. While it has been said that the SI is now open-source software, this isn't entirely true. As of this writing, there are still some issues with the license attached to the SI that prevent it from being truly open.
Many people associate OpenGL with hardware acceleration. While it is true that OpenGL runs very quickly when it has hardware assistance, that acceleration is not required to run an OpenGL application. With a software OpenGL library, OpenGL applications can run and render the same image as they would with hardware acceleration, albeit significantly slower unless the program is very simple. When hardware acceleration is available (in the form of a 3-D graphics card and a driver written for that card), OpenGL applications can run very quickly and smoothly, since most of the intense operations have been offloaded from the CPU to the dedicated graphics board. However, not every accelerator has the ability to perform all the features of OpenGL. When a feature is not supported in hardware, the library may fall back to a software implementation which uses your CPU. For example, very few consumer-class video cards will do transform and lighting (T&L), so normal triangle setup is often done partially in hardware and the rest in software.
Since its initial creation, OpenGL has undergone several revisions and now stands at version 1.2.
In Linux, the implementation of OpenGL used most often is Mesa, created by Brian Paul.
|Designing Electronics with Linux||May 22, 2013|
|Dynamic DNS—an Object Lesson in Problem Solving||May 21, 2013|
|Using Salt Stack and Vagrant for Drupal Development||May 20, 2013|
|Making Linux and Android Get Along (It's Not as Hard as It Sounds)||May 16, 2013|
|Drupal Is a Framework: Why Everyone Needs to Understand This||May 15, 2013|
|Home, My Backup Data Center||May 13, 2013|
- RSS Feeds
- Dynamic DNS—an Object Lesson in Problem Solving
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Designing Electronics with Linux
- Using Salt Stack and Vagrant for Drupal Development
- New Products
- A Topic for Discussion - Open Source Feature-Richness?
- Drupal Is a Framework: Why Everyone Needs to Understand This
- Validate an E-Mail Address with PHP, the Right Way
- What's the tweeting protocol?
- Kernel Problem
3 hours 58 min ago
- BASH script to log IPs on public web server
8 hours 25 min ago
12 hours 1 min ago
- Reply to comment | Linux Journal
12 hours 34 min ago
- All the articles you talked
14 hours 57 min ago
- All the articles you talked
15 hours 44 sec ago
- All the articles you talked
15 hours 2 min ago
19 hours 26 min ago
- Keeping track of IP address
21 hours 17 min ago
- Roll your own dynamic dns
1 day 2 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi
It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?