NAG Logo
Numerical Algorithms Group

NAG's IRIS Explorer - PC (Linux) Frequently Asked Technical Questions

This document is designed for users of IRIS Explorer with PC (Linux)-specific questions. For more general questions, or those that apply to another platform, please select one of the links provided in the right side box.

Questions

Answers

  1. Can IRIS Explorer take advantage of hardware graphics acceleration under Linux? [Using IRIS Explorer 4.0 (or later) on Linux with 3D graphics hardware acceleration.] [Top]

    This note describes how to make use of 3D graphics hardware acceleration under Linux for IRIS Explorer 4.0 (or later releases). It is based on our experiences with the Utah-GLX module and the Matrox G400 accelerator.

    IRIS Explorer is built on top of the Open Inventor library, which - on Linux - is linked against Mesa, the public domain OpenGL(tm)-like library. Mesa (and so IRIS Explorer) usually renders using the standard X11 protocol of the X Window System without taking advantage of any graphics hardware. To add support for graphics hardware, IRIS Explorer must be re-linked to use Mesa along with a hardware accelerated implementation of the GLX protocol such as Utah-GLX. Check http://utah-glx.sourceforge.net for a list of supported hardware accelerators.

    The source to Utah-GLX can be downloaded from http://utah-glx.sourceforge.net/download.html, and instructions on how to build and install it can be found at http://utah-glx.sourceforge.net/docs/INSTALL. Note that you will need the Mesa source (available from http://www.mesa3d.org) to do the build. We used glx-2000328.tar.gz along with the MesaLib-3.1 distribution.

    Before building the new library however, a workaround is required. The Open Inventor library references a Mesa-specific function, glXCreateGLXPixmapMESA, which breaks compatibility with non-Mesa libraries. The solution to this problem is to define glXCreateGLXPixmapMESA as a wrapper function around glXCreateGLXPixmap, the standard OpenGL function, and to include code for this in the build of the library.

    To implement this workaround, first create a file called (say) forInventor.c in glx/libGL, the source directory for libGL in the Utah-glx distribution. The file, forInventor.c, should have the following contents:

    #include <GL/gl.h>
    #include <GL/glx.h>
    GLXPixmap glXCreateGLXPixmapMESA( Display *dpy, XVisualInfo *visual, Pixmap pixmap, Colormap cmap )
    {
    return glXCreateGLXPixmap(dpy, visual, pixmap );
    }

    Next, modify the SRCS line of the Makefile in that directory to include forInventor.c. Finally, build and install the library, as detailed in the INSTALL file. Restart your X server and use the xdpyinfo(1) command to check that the X server now has the GLX extension - i.e.,

    % /usr/bin/X11/xdpyinfo | grep GLX

    should respond with

    GLX

    if the GLX extension is present in the X server.

    In order to use the new library - called libGL.so - with IRIS Explorer, first rename the original (pure Mesa) libGL.so in $EXPLORERHOME/lib. Next, move or copy the new library into that directory, from where it will be automatically loaded by modules at execute time.

    Note that, in the Mandrake 7.0 distribution of Linux, the precompiled libraries and configuration files are already present (for example, the GLX module for the Matrox MG700 card is at /usr/X11R6/lib/modules/glx-mga.so). Were it not for the dependency of Open Inventor on the Mesa-specific function, no further work would be required. As it is, the workaround described above is required before IRIS Explorer (and other Open Inventor applications) can make use of 3D hardware acceleration under Linux.

    Please ask your nearest IRIS Explorer Centre if you have any questions about this note.
© The Numerical Algorithms Group 2008
Privacy Policy | Trademarks

© Numerical Algorithms Group

Visit NAG on the web at:

www.nag.co.uk (Europe and ROW)
www.nag.com (North America)
www.nag-j.co.jp (Japan)

http://www.nag.co.uk/visual/IE/iecbb/PcLinux.asp