CSCI E-Support Logo
      Getting Started       FAQ       IYK       News       Programming       References       Software      
Programming

Programming - Mesa/Glut

What is Mesa?
The following is from the Mesa README file:
Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL*.

* OpenGL(R) is a registered trademark of Silicon Graphics, Inc.

While Mesa uses the OpenGL API and mimics its semantics, it is important to understand that Mesa is not a real implementation of OpenGL since it is not licensed and has not been tested by the OpenGL conformance tests. That said, Mesa is still a viable alternative to OpenGL.

Since version 2.0 Mesa implements the OpenGL 1.1 API specification. Since version 3.0 Mesa implements the OpenGL 1.2 API specification.

Only a few features are not yet implemented:
trimmed NURBS
polygon antialiasing


What is GLUT?
The following description is taken from http://reality.sgi.com/mjk_asd/glut3/
GLUT (pronounced like the glut in gluttony) is the OpenGL Utility Toolkit, a window system independent toolkit for writing OpenGL programs. It implements a simple windowing application programming interface (API) for OpenGL. GLUT makes it considerably easier to learn about and explore OpenGL programming. GLUT provides a portable API so you can write a single OpenGL program that works on both Win32 PCs and X11 workstations.

GLUT is designed for constructing small to medium sized OpenGL programs. While GLUT is well-suited to learning OpenGL and developing simple OpenGL applications, GLUT is not a full-featured toolkit so large applications requiring sophisticated user interfaces are better off using native window system toolkits like Motif. GLUT is simple, easy, and small. My intent is to keep GLUT that way.

The GLUT library supports the following functionality:
Multiple windows for OpenGL rendering.
Callback driven event processing.
An `idle' routine and timers.
Utility routines to generate various solid and wire frame objects.
Support for bitmap and stroke fonts.
Miscellaneous window management functions.
The GLUT library has both C, C++ (same as C), FORTRAN, and Ada programming bindings. The GLUT source code distribution is portable to nearly all OpenGL implementations for the X Window System and Windows 95 and NT. GLUT also works well with Brian Paul's Mesa, a freely available implementation of the OpenGL API.

Because GLUT is window system independent (as much as possible), GLUT can be implemented for window systems other than X. Implementations of GLUT for OS/2, NT & Windows 95, and the Mac have ben implemented, but only the Win32 and X11 versions are part of the official GLUT source code distrbution.


How do I compile programs using Mesa/GLUT on the CSP machines?
Assumming that you have a program which is written to use Mesa/GLUT, you can download the sample Makefile as a starting point for compiling your program. Click here for the sample Makefile. Read the Makefile for instructions on how to use it.

The file /usr/share/doc/mesademos/samples.tar.gz has some example programs that you can compile and run. To extract the samples, run the following command from your home directory.
tar -zxvf /usr/share/doc/mesademos/samples.tar.gz
This will create a samples directory with the mesa demos inside. A Makefile is included with the samples, but will probably not work correctly. The Makefile mentioned above can be used.


Are there any other resources on-line?
Local Resources:
  • /usr/doc/mesa-doc
  • /usr/doc/mesag-dev
  • /usr/doc/mesag3




updated: 2003-08-26