Thursday, January 31, 2008

Linux−Specific Command Line Options

This section will cover command line options that are specific to the Linux version of Quake II. There are
plenty of other Quake II options, but they're beyond the scope of this HOWTO. Check out some of the sites
listed in section General Quake Information for this kind of information.
These are actually cvars (client variables) that you can set in the Q2 console, but it makes the most sense to
set them on the command line. Set them with +set on the command line, like:
Linux Quake HOWTO
Choosing a GL driver ** 25
./quake2 +set cd_dev /dev/hdc
cd_dev device
Name of the CD−ROM device.
nocdaudio value
Disable CD audio if value is nonzero
sndbits num
Set sound bit sample size. Default is 16.
sndspeed num
Set sound sample speed. Usual values are 8000, 11025, 22051 and 44100. If set to zero, causes the
sound driver to attempt speeds in the following order: 11025, 22051, 44100, 8000.
sndchannels num
Indicates stereo or mono sound. Defaults to 2 (stereo). Use 1 for mono.
nostdout value
Don't do any output to stdout. Use this if you don't want all the console output dumped to your
terminal.

Wednesday, January 23, 2008

The GLX Renderer ++

ref_glx.so is linked against standard OpenGL libraries instead of Mesa. This allows Quake II to run on
other 3D hardware that is supported by other OpenGL implementations. At this time, I dont' know of any
OpenGL implementations that support hardware other than 3Dfx, but this renderer ensures that when they
appear, we'll be able to play Quake II with them.
Use of the GLX interface also removes GL Quake II's dependency on SVGAlib for keyboard and mouse
input.
This is a GLX application, and as such, must be run from X.
You can use this client with Mesa/3Dfx if you install Mesa and Glide as explained in the previous section,
then set the $MESA_GLX_FX environment variable to "fullscreen" before you run quake2:
export MESA_GLX_FX=fullscreen
./quake2 +set vid_ref glx +set _windowed_mouse 1
Why the +set _windowed_mouse 1 option? Remember that this is an X application which happens to
use your 3Dfx card. Even though the display takes up your entire screen, Quake II is stil running in a
window. This means that if you're not very careful, you could move the mouse pointer outside the Quake II
window, and Quake II will suddenly stop responding to mouse and keyboard input. +set
_windowed_mouse 1 avoids this problem by telling quake2 to grab the mouse and not let it move
outside its window.

Saturday, January 12, 2008

lib3dfxgl.so **

With Quake II version 3.19, an alternative to the Mesa library is available. lib3dfxgl.so is a mini−GL
driver optimized for Quake that provides better framerates than Mesa. This is a port of a driver that 3Dfx
developed for Quake under Windows. It's included in the Quake II package, and there's no reason you
shouldn't use it.
Like Mesa, lib3dfxgl.so requires that the Glide library be installed in order to access your 3Dfx card.
Linux Quake HOWTO
Mesa ** 24
Choosing a GL driver **
With version 3.20, using this driver instead of Mesa is much easier than it was previously. There's a new
CVAR, gl_driver that you set to indicate which GL driver quake2 should use. To run with the
lib3dfxgl.so driver, do:
./quake2 +set vid_ref gl +set gl_driver lib3dfxgl.so
To run with Mesa, do:
./quake2 +set vid_ref gl +set gl_driver libMesaGL.so
Note that the .so files you refer to must exist in your quake2 directory. A symbolic link is fine if, say, your
Mesa library is in /usr/local/lib and you don't want to have two copies around.

Monday, January 07, 2008

Mesa **
Once glide's installed, you need to install Mesa, a free OpenGL implementation by Brian Paul
(brianp@elastic.avid.com). Luckily, you won't have to look far, because Mesa 2.6 is included with the Quake
II binaries. All you have to do is move it to the right place:
cd /usr/local/games/quake2
cp libMesaGL.so.2.6 /usr/local/lib
ldconfig
The RedHat distribution comes with a (IMO) broken ld.so configuration. /usr/local/lib is not part
of ld.so's search path by default, so anything you install there won't get used. You can remedy the situation
by adding the line /usr/local/lib to your /etc/ld.so.conf file, or including
/usr/local/lib in your $LD_LIBRARY_PATH. Alternatively, you could install all new libraries
someplace like /lib, but this approach seriously offends my tidy nature.
If you want to upgrade Mesa to a more recent version (Mesa 3.0 is the most recent version as of this writing),
you can download the latest from ftp://iris.ssec.wisc.edu/pub/Mesa If you have a RedHat 5.x or other
glibc−based Linux distribution, see Glibc, RedHat 5.x, Debian 2 considerations in the Troubleshooting/FAQs
section for important information about compiling libraries for Quake.
After you've built it according to the instructions, you will have to do two things:
Remove your old Mesa installation. If you previously installed a libMesaGL.so.2.6 as
described above, you must remove it or Quake II may not use the new version.
cd /usr/local/lib/
rm −f libMesaGL.so.2*
•
If the new Mesa has a major version number that's greater than 2, you need to create a link to it with
the name libMesaGL.so.2:
cd /usr/local/lib/
ln −s /wherever/you/installed/it/libMesaGL.so.3.0 libMesaGL.so.2
ldconfig
•