The Mesa 3-D graphics library
Version 1.2.2
Copyright (C) 1995 Brian Paul
Introduction
============
Mesa is a 3-D graphics library with an API which is very similar to that
of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax
or state machine, it is being used with authorization from Silicon Graphics,
Inc. However, the author makes no claim that Mesa is in any way a
compatible replacement for OpenGL or associated with Silico n Graphics, Inc.
Those who want a licensed implementation of OpenGL should contact a licensed
vendor. This software is distributed under the terms of the GNU Library
General Public License, see the LICENSE file for details.
* OpenGL(R) is a registered trademark of Silicon Graphics, Inc.
Author
======
Brian Paul
Space Science and Engineering Center
University of Wisconsin - Madison
1225 W. Dayton St.
Madison, WI 53706
brianp@ssec.wisc.edu
Status
======
I've been working on this library in my spare time since August, 1993.
It's currently about 90% complete. You'll find that most programs which
use the OpenGL tk, aux or GLUT toolkits will work with Mesa without changing
the source code at all.
Features which are complete:
all glBegin() primitives
all model and view transformations
clipping (against user clip planes and view volume)
lighting
smooth shading
depth buffering
accumulation buffer
alpha testing/blending
stencil buffer
dithering
logic operations
evaluators (curves and surfaces)
feedback/selection
fog (per-pixel or per-vertex)
polygon/line stippling
read/write/copy pixels
tk and aux libraries for X11
context switching (multiple windows)
RGB mode simulated in color mapped windows
the GLX library (as close as I can get)
Features which are mostly complete:
display lists
texture mapping
the GLU library
NURBS
Missing features:
anti-aliasing
mipmapping, non-point-sam pled texture mapping
glPixelZoom
The primary goal of this library has been correctness, speed was secondary
(but not neglected!). Many optimizations can still be done.
The core library was originally written on an Amiga using the DCC compiler.
Later on it was moved to an SGI. Current development is done on an SGI
system.
Mesa works on most Unix workstations with ANSI C and X11. Now there's also
a Microsoft Windows driver (see windows/README.WIN). A very outdated and
inoper ative Amiga driver is also included.
Please send bug reports to the author. Include information describing
your system, which version of Mesa you're using, and how to reproduce the
problem. Bug fixes are especially welcome. Note that some parts of Mesa
(widgets, GLU tesselator, NURBS, etc) were contributed by others and any
bugs in those components should be sent to the respective author.
Since the OpenGL API is used, OpenGL documentation can serve as the
documentation for Mesa' s core functions. Here are a few sources:
Man pages: http://www.digital.com:80/pub/doc/opengl/
Spec doc: http://www.sgi.com/Technology/openGL/glspec/glspec.html
Installation for Microsoft Windows
==================================
See the windows/README.WIN file for details. Note that any problems with
the Windows driver should be addressed to Mark Peterson.
Using the library (with Unix/X11 systems)
=========================================
Header and l ibrary files:
To use the library with your own applications you may want to move the
files in "include/" to "/usr/local/include/" and the libraries in "lib/"
to "/usr/local/lib/". Then compile your graphics application with
"-I/usr/local/include" and link with "-L/usr/local/lib -lMesaGL -lMesaGLU",
for example. Look at the demos/Makefile for an example.
While Mesa includes its own header files you can optionally compile Mesa
using the real OpenGL header files i f you have them. Just remove or move
the GL/gl.h, GL/glx.h, and GL/glu.h Mesa files and replace them with copies
or links to the real OpenGL header files. Then recompile Mesa.
Toolkits:
Initially, you may write your own Mesa programs using the aux or tk tool-
kits which are used in the OpenGL Programming Guide and in SGI's demos,
respectively. However, these toolkits weren't meant for use in real app-
lications. You have several alternatives:
1. Go di rectly to the X/Mesa interface using the functions described in
include/GL/xmesa.h. This requires experience with X programming.
2. Use the GLX (simulated since Mesa doesn't implement the GLX extension)
functions. These functions look like, and try to act like, the real GLX
functions used by OpenGL in conjunction with the X window system.
3. GLUT (OpenGL Utility Toolkit) was written by Mark Kilgard at SGI as
a replacement for aux and tk. It pro vides a simple, portable, window-
system independent interface allowing you to write OpenGL applications
quickly and easily. GLUT isn't included with Mesa but you'll find
instructions on how to get and build GLUT in the file GLUT/README-MESA.
4. Use a Mesa widgets. Look in the widgets/ directory for more info.