|[Home] [Credit Search] [Category Browser] [Staff Roll Call]||The LINUX.COM Article Archive|
|Originally Published: Tuesday, 11 January 2000||Author: Will Weisner|
|Published to: learn_articles_support/Articles||Page: 1/1 - [Printable]|
LinuxPlanet.com: 3D Graphics Hardware in Linux
Expert Linux users know that choosing hardware for a Linux system must be done with care to get top performance. 3D Graphics cards are no exception to this! This guide is meant to provide a complete assessment of the current supported 3D graphics cards in Linux, and t o give a quick tutorial on installing drivers for and using them.
|Page 1 of 1|
What is a 3D Graphics Board?Using computers to render 3D graphics is not an unfamiliar procedure. The newest 3D games are becoming more and more realistic and lifelike, while industries depend on technology such as CAD (Computer Aided Design) to model complex real-world objects without actually constructing them. Whether you require them to assist you in business or you just want to play a few games, 3D graphics hardware is becoming increasingly popular, as the speed and visual quality of the boards increases while the prices continue to drop.
3D graphics cards can work in one of two ways: Either combined with a normal 2D video adapter, or as a second board which connects directly to the monitor, and interrupts the video signal through a "pass-through" from the 2D board. Either way, the 3D chipsets act on special commands which tell them coordinates for 3D shapes, lighting parameters, etc. Then, they very quickly render the 3D images to your monitor. How quickly? The newest 3D accelerators from 3Dfx can drawnearly 7 million polygons a second (a polygon is a multi sided 3D surface). The result is photo-realistic 3D imagery which hardly draws any resources from the rest of your PC.
OpenGL and LinuxCurrently, the only graphics cards which are supported in Linux are the Matrox Millennium G200, and any card utilizing a 3Dfx chipset. NVIDIA has promised to release drivers for its TNT2 boards, but it is unclear when those drivers will materialize.
UPDATE (6/3/99): NVIDIA has just released drivers for all of their 3D accelerated chipsets, more information can be found here
Programs can interface with 3D accelerators using a standard library called OpenGL. OpenGL was developed by SGI for use in their high-end graphics workstations, and is now managed by an independent consortium of corporations. Writing OpenGL drivers for a particular card requires paying for a license and a certification of compliance to the OpenGL standard. However, Linux programs can still use the OpenGL library thanks to a free replacement called Mesa. Mesa is an Open Source clone of OpenGL which is free for anyone to download. In order to use 3D hardware in Linux, you must install the Mesa drivers for your card; then programs will use the Mesa libraries when they want to draw in 3D.
Installing a Video Card with a 3Dfx Chipset3Dfx was the first company whose 3D cards were supported in Linux. This is because the proprietary API they use, called Glide, has recently been ported to Linux. In order to use these cards, one must install Glide, then recompile Mesa to use Glide as a renderer.
The Glide for Linux homepage contains links to the Glide libraries for Voodoo1, Voodoo2, and Voodoo Rush chipsets. The Glide libraries for the Voodoo Banshee and Voodoo3 are found elsewhere at this site. Since the Voodoo 3, Rush, and Banshee cards are both 2D and 3D, these pages also contain links to 2D X servers which run with these cards. Installing Glide is as easy as downloading the correct rpm and installing it using:
rpm -Uvh Glide*.rpm
If you are on a system that does not have rpm, then follow the instructions at http://glide.xxedgexx.com/3DfxNoRPMS.html to convert the rpm's to a usable package.
The next step is to download Mesa from The Mesa Homepage. The very latest version of Mesa, as of this writing, is 3.1b2, which is available in the "beta" directory on the Mesa ftp site. Optionally, you can download Mesa 3.0, which is the latest stable version. Mesa comes as two tar.gz files, MesaLib and MesaDemos. Download them both and unzip them wherever you wish. They will both unzip into a single directory, Mesa-3.x, where x is the minor version number. I would suggest reading the README, README.LINUX, and README.3DFX files before continuing. When you are ready, type:
to compile Mesa.
When it is done, copy the include files and the libraries to where they need to go on your system. To do this, make sure there is no other version of Mesa which might have been installed by your distribution, then:
cd include/ cp -r GL/ /usr/include/ cd .. cd lib/ cp -d * /usr/lib/ ldconfig
Once this is done, your 3Dfx board will be fully installed.
Some 3Dfx NotesBecause the Glide libraries access the underlying 3D hardware directly, any programs that want to use a 3Dfx board must be run as root. Since this can be somewhat inconvenient, not to mention a large security risk, there exists a good work-around in the form of a 3Dfx kernel module. Once this module is installed, programs write to the device file /dev/3dfx in order to send the card commands. This is very convenient, since allowing or disallowing users access to the 3D card is as easy as changing permissions on the device file.
The 3Dfx kernel module is available at http://www.xs4all.nl/~carlo17/3dfx/. To install it, download the tar.gz and issue the following commands:
mkdir dev3dfx cd dev3dfx/ tar -zxvf ../Dev3Dfx-2.7.tar.gz make cp 3dfx.o /lib/modules/`uname -r`/misc mknod /dev/3dfx c 107 0 insmod 3dfx
Then, edit your init scripts so that the "insmod 3dfx" line gets executed at each boot.
Further notes: GlideControl is a utility for tuning a voodoo1 or voodoo2 board under Linux. Simply run it and select the options you would like, and it will set the correct variables for your card.
Finally, an excellent resource for trouble with 3Dfx boards under Linux is the 3Dfx Linux newsgroup. If you are having trouble with a Glide related issue, then post a polite question and wait a day or so for an answer to appear.
Installing the Matrox G200The G200 has been supported in 2D for some time as part of the standard XFree86 SVGA package. Recently, Matrox released the specs for the 3D portions of this card, and as a result, preliminary drivers for it have been written. They are available at http://www.on.openprojects.net/glx/. Click on the FAQ link and follow the instructions to download and install the binary packages. This will install a modified version of Mesa as well as a "glx" module, which will enable X to cooperate with OpenGL commands. Currently the G200 drivers are still in heavy development, so support options for them is limited. Make sure you read all the documentation available.
Some 3D Software to TryBy far the largest and most comprehensive listing of non-game related 3D software for Linux is at The Linux3D.org software site. Note that only some of these applications will benefit from 3D acceleration.
The best way to use that new 3D card is to download some games. By far the most incredible games for Linux are Quake and Quake 2 (Quake 3 is also out for Linux, currently as a pre-alpha test). Linuxquake.com contains a full walkthrough on getting and installing the Linux version of Quake. If you have a 3D card and you run Linux, do not miss these games...they are fully 3D accelerated and they look incredible.
Another good place place to look is the Linux Game Tome, a news site dedicated to Linux games. This site contains a listing for just about every Linux game in existence, so browse through it for awhile and see what you find.
SummaryLinux has not been left out of the 3D hardware revolution. If you choose your 3D hardware wisely, you can reap the benefits of a fast, stable operating system combined with stunning 3D graphics.
Currently, the best 3D card to buy for a Linux system is the Voodoo3, which is a combination 2D/3D card. If you are really attached to your 2D card and don't mind giving up another PCI slot, then a Voodoo2 is a good 3D-only choice. Good luck with all your future 3D Linux endevours!
This article graciously provided by LinuxPlanet.
|Page 1 of 1|