15-869 Course Software
The starter code we provide for programming assignments will make use
of the following libraries:
We'll primarily be supporting SGI machines and Linux machines,
but the starter code we provide should compile without too much
difficulty on other UNIX machines such as Suns and HP's,
or on Windows 95/98/NT.
To get the latter to work, you may have to download Mesa and FLTK
yourself, if they're not on your system already,
install them, and set up a new Makefile.
OpenGL is a
programming interface for interactive 3D graphics.
We have the
man pages on line. OpenGL implementations
exist for various platforms.
To learn more OpenGL we recommend the book
OpenGL Programming Guide, Third Edition: The
Official Guide to Learning OpenGL, Version 1.2
by Mason Woo, et al.
Addison Wesley, 1999.
(Earlier editions of this book are OK, too).
If you have an SGI machine,
you can read the OpenGL Programming Guide
online using the Insight electronic documentation package : type
"insight &", wait a minute for the program to start,
then find "OpenGL_PG" in the top subwindow and double-click on it.
- Mesa is a free
OpenGL clone which runs on almost anything, albeit more slowly.
file is also useful, especially for tips on how to manage
X-Windows color maps.
Mesa can emulate a 24 bit display on an 8 bit one, and that's the way
we recommend using Mesa on the Suns.
Setting up the colormap so this works right is a bit tricky.
If you want the full story, see
the user guide,
and do a find for "glXChooseVisual".
The code we're providing for the assignments
should set things up so that you don't
need to worry about this, however.
We are using Mesa on the Suns.
FLTK is a good
user interface library that
runs on both Windows and UNIX and supports OpenGL.
the Simple Vector Library, written by Andrew Willmott here at CMU,
is a C++ library for vector and matrix arithmetic.
It is very useful for operations with 2-D and 3-D vectors,
colors, and transformations (translation, scaling, rotation, ...).
the Vector Library, is a more sophisticated version of SVL (above)
that has very efficient data structures for sparse matrices,
capabilities for manipulating submatrices
and code for solving linear systems using
the conjugate gradient method and other techniques.
As of 9/10 we haven't set up VL, but it's easy for you to do -- see the
There are also numerous other software libraries for matrix algebra.
This is a little library provided for your convenience. It
supports a very simple interface to and write TIFF or PPM picture files.
The routines you might be
interested in are pic_read and pic_write. To use
this library, you need to put #include <pic.h> in your
source code and -lpicio on your link line. Currently, the
only documentation for the library is the header file,
and an example program
that reads, modifies, and writes picture files.
Libpicio is a layer on top of Sam Leffler's excellent
libtiff library for
TIFF picture file I/O.
If you're on Linux, say, and you try "make -f Makefile.linux" and you
get an error message such as: "/usr/include/GL/gl.h: I ain't got no idea
where this file is!" then try the following, which
updates the dependency list at the end of the Makefile:
make -f Makefile.linux depend
The following documentation is biased toward SGI's and Suns, but it's
all we've written up so far.
You must link in different libraries when using OpenGL on Suns and SGI's.
Typical link sequences are:
and if you're linking with the pic_ and tiff_ routines
that read and write TIFF and PPM picture file format,
then you'll need -lpicio -ltiff as well.
on SGI: -lforms -lGLU -lGL -lX11 -lm
on Sun: -lforms -lMesaGLU -lMesaGL -lX11 -lXext -lsocket -lm
You'll need to type the command
for shared object files such as libfltk.so and libGL.so to be resolved
On SGI's you'll need the additional line
setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib:/afs/cs/project/classes-ph/869/pub/lib
when compiling with the -n32 compiler option and instruction set,
as our makefiles do.
It's probably a good idea to put these commands in your .login .
setenv LD_LIBRARYN32_PATH /usr/lib32:/afs/cs/project/classes-ph/869/pub/lib32
You can get a list of shared object files that a given executable looks
for, by running elfdump -Dl <PROGRAM> on an SGI
or ldd <PROGRAM> on a Sun.
If you're really curious about which versions of shared object files are
getting linked in, you can set the following environment variables and
this will affect the runtime linker, rld (on SGI's):
so that every time you run a program it will print gobs of info.
To turn off the linker debugging info, do
setenv _RLD_ARGS "-quickstart_info -v"
setenv _RLD_PATH /usr/lib/rld.debug
15-869, Image-Based Modeling and Rendering
Paul Heckbert, Sept. 1999