

OpenGL was developed by Silicon Graphics Inc. (SGI) from 1991 and released in January 1992 and is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group.


OpenGL is installed on all CSE systems. This is Sun's OpenGL version 1.1.2, which meets the OpenGL 1.1 spec. This includes the OpenGL development kit (the include files, etc.). It all lives in /usr/openwin/, in the appropriate places. For example, the include files are in /usr/openwin/include/GL/.

The GLUT library does not come with OpenGL itself. However, it is compiled and available in /util/X11/glut/. So, putting it all together, the compile line for an OpenGL GLUT program would be:

% cc -c -I/usr/openwin/include -I/util/X11/glut/include file.c

... and the link line would be:

% cc -L/usr/openwin/lib -L/util/X11/glut/lib -R/usr/openwin/lib file.o -lGL -lGLU -lglut -lX11 -lm

And, if it uses Motif as well, then you need the Motif and Xt libraries too.

Also installed (mostly because of the Xterminal problem) is Mesa version 2.6. Mesa is an OpenGL work-alike. Mesa's libraries are in /util/X11/lib, and include files in /util/X11/include/GL/.

A sample Mesa compile line is:

% cc -I/util/X11/include -L/util/X11R6/lib/ -R/util/X11/lib file.c -lglut -lMesaGL -lMesaGLU -lXi -lXmu -lXext -lX11 -lm -lpthread