MesaLib-6.5.2

Introduction to MesaLib

Mesa is an OpenGL compatible 3-D graphics library.

Package Information

  • Download (HTTP): http://downloads.sourceforge.net/mesa3d/MesaLib-6.5.2.tar.bz2

  • Download MD5 sum: e4d894181f1859651658b3704633e10d

  • Download size (including recommended download): 3.1 MB

  • Estimated disk space required (including recommended download): 172 MB

  • Estimated build time (including recommended download): 1.6 SBU

Additional Downloads

Recommended demonstration and diagnostic utilities for verifying OpenGL operation

Optional GLUT library (see also freeglut-2.4.0)

MesaLib Dependencies

Required

Xorg Libraries, Xorg Utilities, libdrm-2.3.0, and expat-2.0.1

User Notes: http://wiki.linuxfromscratch.org/blfs/wiki/mesalib

Installation of MesaLib

Extract all three tarballs from the same top-level directory as they all will extract to the Mesa-6.5.2 directory.

Install MesaLib by running the following command:

make linux-dri-x86 OPT_FLAGS="-O2 -fno-strict-aliasing" \
    DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri \
    X11_INCLUDES=-I${XORG_PREFIX}/include \
    EXTRA_LIB_PATH=-L${XORG_PREFIX}/lib

If you downloaded and extracted the Demos package, build the programs with the following commands:

sed -i 's@-l$(GLUT_LIB)@@g' configs/default &&
make -C progs/xdemos PROGS='glxinfo glxgears'

This package does not come with a test suite.

Now, as the root user:

make install INSTALL_DIR=${XORG_PREFIX} \
    DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri &&
install -dv ${XORG_PREFIX}/share/doc/MesaLib-6.5.2 &&
install -v -m644 docs/* ${XORG_PREFIX}/share/doc/MesaLib-6.5.2

If you built the demo programs, install them using the following command as the root user:

install -v -m755 progs/xdemos/glx{info,gears} ${XORG_PREFIX}/bin

Finally, if installing to any prefix other than /usr, you should create symlinks to the GL headers in /usr/include. Execute the following command as the root user:

ln -s -v ${XORG_PREFIX}/include/GL /usr/include
[Tip]

Tip

Do not remove the Mesa source tree yet, it will be required to build the Xorg-Server-1.2.0.

Command Explanations

make ... linux-dri-x86: The linux-dri-x86 target is specified to use a few other helpful flags in addition to the defaults. See the other targets in the configs directory if your architecture is not x86.

OPT_FLAGS="-O2 -fno-strict-aliasing": A bug where OpenGL applications are shifted to the left by 50% can be worked around by adding -fno-strict-aliasing to the compiler flags.

DRI_DRIVER_INSTALL_DIR=${XORG_PREFIX}/lib/X11/modules/dri: This setting specifies the location that the DRI modules will be installed to. This path is also built into libGL.so.

sed -i 's@-l$(GLUT_LIB)@@g' configs/default: Disables linking against the GLUT libraries for the demo programs, omit this command if you downloaded and extracted the GLUT tarball.

make ... PROGS='glxinfo glxgears': Only builds the glxinfo and glxgears programs.

Contents

Installed Programs (optional): glxgears and glxinfo
Installed Libraries: libGL.so, libGLU.so, libGLw.so, *_dri.so and optionally, libglut.so
Installed Directories: $XORG_PREFIX/lib/modules/dri and $XORG_PREFIX/share/doc/MesaLib-6.5.2

Short Descriptions

glxgears

is a GL demo useful for troubleshooting graphics problems.

glxinfo

is a diagnostic program that displays information about the graphics hardware and installed GL libraries.

libGL.so

is the main OpenGL library.

libGLU.so

is the OpenGL Utility library.

libGLw.so

is the Xt/Motif OpenGL drawing area widget library.

libglut.so

is the OpenGL Utility Toolkit (GLUT) library.

Last updated on 2008-05-03 00:18:57 -0500