OpenGL isn't the only 3D video API. The video card manufacturer 3dfx promotes Glide, which is an extended version of OpenGL available on many platforms. Microsoft promotes its own Direct 3D API, but Direct 3D isn't available for Linux. Therefore, if you intend to use only a video card under Linux, you can ignore any claims of Direct 3D support.

OpenGL is an unusual API in that it exists across platforms. Therefore, an OpenGL application written for one OS (for example, Windows) can be ported to another OS (such as Linux) with minimal fuss. OpenGL doesn't include all the features needed for an application, though, so it's still necessary to modify code for dialog boxes, disk accesses, and so on.

Like X, OpenGL is a network-aware API. This means that you can use a 3D application on one computer and use another computer to display the first computer's data. For example, you

Part III

can use a very powerful Linux computer to create 3D models of buildings, but display those models using much less powerful computers equipped with suitable 3D graphics cards. The two computers need not even run the same OS. If you're used to dealing with X in a networked environment, this concept should be familiar.

Several different OpenGL implementations for Linux exist:

• Mesa This implementation, available from, is not officially an implementation of OpenGL for Linux. It is, rather, "very similar to... OpenGL," according to the Web site's opening page. Many OpenGL programs work quite well using Mesa, and it can be an acceptable replacement for OpenGL for many users.

• Xi Graphics' 3D Accelerated-X Xi Graphics ( has released a version of its Accelerated-X commercial X server that includes OpenGL support. This product supports a variety of 3D graphics cards and includes code licensed from SGI.

• Metrolink OpenGL Another competitor in the commercial X server market for Linux, Metrolink ( offers a package that includes the Metro-X server and an OpenGL implementation. Like Xi Graphics' product, Metrolink's OpenGL uses code licensed from SGI.

Whatever form of OpenGL you use, the result is an ability to create 3D images with relatively little programming effort. Figure 12.2 shows a simple example, produced by a demo program included with Mesa. OpenGL is likely to be used by many applications in the future, as more and more serious applications find uses for 3D graphics.

Figure 12.2

OpenGL lets you create 3D geometric images, animate them, and combine them with other images.

Figure 12.2

OpenGL lets you create 3D geometric images, animate them, and combine them with other images.

Chapter 12

It's important to realize that OpenGL support for a video card is independent of X support for the same video card. A card might have very good 2D support in XFree86, Accelerated-X, or Metro-X, for instance, and have excellent 3D hardware, and yet have no OpenGL 3D support. Therefore, if 3D acceleration is important to you, it's vital that you check for support in both XFree86 (or a commercial X server) and your OpenGL implementation of choice.

Video RAM

In order to display an image on a monitor, a computer needs to provide a steady stream of information to the screen. Most monitors today have a refresh rate in the 70Hz-100Hz range at 12

the resolutions at which the monitor is used, which means the monitor's display is completely redrawn 70-100 times per second. The video card must be able to provide a constant stream of D

data to the monitor. Consequently, the video card must have continuous access to the current o image of the display. One of the reasons video cards exist at all is so that the video card can A

serve as a buffer between the computer and the monitor. Rather than deal with the logistical s nightmare of providing access to a single image to both the computer's CPU and the video hardware, the video card serves as an intermediary between two banks of memory, as shown in

Figure 12.3.

Figure 12.3

One of the functions of a video card is to create a pool oof RAM apart from the system RAM in order to isolate the system RAM from video display-timing requirements.

Figure 12.3

One of the functions of a video card is to create a pool oof RAM apart from the system RAM in order to isolate the system RAM from video display-timing requirements.

This design leads to the need to consider a video card's RAM separately from the RAM used on a computer's motherboard. Using a video card with inadequate RAM can restrict the availability of high-resolution or high-color-depth video modes. Different video cards also support different types of video RAM, which vary in their speed characteristics, just as different types of motherboard RAM do.

Part III

Integrated Motherboard and Video RAM

The separation of video RAM from the motherboard's main memory store is literal for most desktop computers, which use video cards separate from the motherboard. This separation doesn't always occur, however. One of the main situations in which video and motherboard RAM are integrated is in motherboards that include video functionality on board.

When a single pool of RAM functions as both motherboard RAM and video RAM, the motherboard BIOS usually provides some means of specifying how much RAM is devoted to video functions. Typical choices today range from 2MB-16MB of RAM. If you devote, say, 4MB of RAM from 64MB total to video functions, then that 4MB will be treated as if it were separate, at least so far as the design of the chipsets involved allow. Linux will see only 60MB of main memory. Just as important, overall system performance can suffer, because access to the pooled RAM for video display purposes can slow access to RAM by the CPU.

Not all systems that include video support on the motherboard use a single pool of RAM for system and video use. Some of these designs include a dedicated area of RAM for the video functions. Such designs can provide slightly better performance than that of otherwise similar systems which use a pooled RAM area.

Was this article helpful?

0 0
The Ultimate Computer Repair Guide

The Ultimate Computer Repair Guide

Read how to maintain and repair any desktop and laptop computer. This Ebook has articles with photos and videos that show detailed step by step pc repair and maintenance procedures. There are many links to online videos that explain how you can build, maintain, speed up, clean, and repair your computer yourself. Put the money that you were going to pay the PC Tech in your own pocket.

Get My Free Ebook

Post a comment