
Using mercury_opengl is not all that different to using a C interface to
OpenGL.  See the samples for example code, and the interfaces of
the modules.  Note that we don't consider these modules fully documented
in any way, but if you know OpenGL, you shouldn't have any problems.

You need to add some information to your Mmakefile to tell mmake
where the mercury_opengl library is, and to link with the
mercury_opengl, Mesa/GL and X libraries.

The following is an example. You may need to change the `MesaGLU' and
`MesaGL' if you are using a different OpenGL implementation.
Don't forget to change the directories where this package is installed.

---------------------------------------------------------------------------

OPENGL_MLLIBS  = -lMesaGLU -lMesaGL -L/usr/X11R6/lib -lX11 -lXmu -lXext -ldl

MERCURY_OPENGL_DIR  = some/directory/mercury_opengl

# Tell mmake to use the `mercury_opengl' libraries.
VPATH           = $(MERCURY_OPENGL_DIR):$(MMAKE_VPATH)
MCFLAGS         =  -I$(MERCURY_OPENGL_DIR) $(EXTRA_MCFLAGS)
MLFLAGS         =  -R$(MERCURY_OPENGL_DIR) \
                        $(EXTRA_MLFLAGS) -L$(MERCURY_OPENGL_DIR)
MLLIBS          = -lmercury_opengl $(OPENGL_MLLIBS) $(EXTRA_MLLIBS)
C2INITFLAGS     = $(MERCURY_OPENGL_DIR)/mercury_opengl.init

---------------------------------------------------------------------------

You can then use EXTRA_MCFLAGS, EXTRA_MLFLAGS, etc to set any other
options you need.

