Using Mesa to run OpenGL Remotely

(Thanks to Alex Roetter for writing this up!)

Note: We won't be able to support this or answer questions about it, but are providing this info since it will probably be useful.

For a while I was trying to be able to display OpenGL programs remotely, which is complicated by the use of GLX extensions. I finally figured it out, and thought that it might be useful for other students...

There is a OpenGL compatible library called Mesa, which only makes standard X calls, not GLX calls. The source is available at http://www.ssec.wisc.edu/~brianp/Mesa.html.

However, a pre-built version of the libraries for SGI can be found on the leland systems at ~aroetter/public/lib.

Since GL is linked in dynamically, you can override the order in which the system searches for libraries to have it find the Mesa libraries first, so it will run with those (and hence display anywhere). To do this, copy the Mesa libraries into some directory, and then set up links so the system thinks they are the OpenGL libraries by typing:

% ln -s libMesaGL.so libGL.so
% ln -s libMesaGLU.so libGLU.so
Then you can set the environment variable LD_LIBRARY_PATH to be the directory where you installed the libraries:

% setenv LD_LIBRARY_PATH /some/directory/here
does it with csh (tcsh).

After that, just set your DISPLAY and any GL program, even the pre-built demos, will run anywhere without needing to recompile it. This is slower than using GL, but it is good for times when you don't have enough time to justify getting over to sweet hall, but just want to work for a few minutes.


CS248: Introduction to Computer Graphics, Pat Hanrahan, Winter 98