XFree86/Mesa GLX

***    the instructions in this file are out of date   ***
*** please see the file INSTALL for build instructions ***

This revised version of Steven Parker's Mesa based GLX encoder/decoder for 
XFree86(tm) supports dynamic loading by the XFree86 servers (via dlopen()) 
of a shared object GLX module. For systems that don't support dlopen() 
or for XFree86 servers that have otherwise been built with 
"BuildDynamicLoading" xf86site.def option disabled, it will also build
a pair of static linked libraries that can be linked into the XFree86 
server in the place of the glx stub library.

Note: This server extension is still under development and has several 
      known problems, and undoubtedly a number of unknown ones as well. It 
      should be considered early alpha.

WARNING: this requires several steps of manual setup and configuration to
         build and install.

          ********** Disclaimer and Acknowledgments **********

This package is not a licensed implementation of OpenGL(R), as such the 
contributors to this package can make no claims as to the package's
comformance with OpenGL specs. For details see the disclaimer in
the Mesa package README or webpage:

  http://www.ssec.wisc.edu/~brianp/Mesa.html#Disclaimer

and the OpenGL faq sections two and three:

  http://www.sgi.com/Technology/openGL/faq1.html

                                 ***

   OpenGL(R) is a register trademark of _Silicon Graphics, Inc._

   XFree86(tm) is a trademark of _The XFree86 Project, Inc._

                     ******* Resources *********

You will need some clients.  Look at:

   ftp://sgigate.sgi.com/opengl/contrib/examples.tar.Z

These programs generally run much better with double-buffering (-db 
command line parm for most).

Some of the programs in the demo directory of Mesa can also be compiled to
run with this package, the Imakefile does need changes though. An alternate
to recompiling is using a link from libMesaGL.so* to libGL.so.

Some useful URL's:

   http://www.sgi.com/Technology/openGL/  -- OpenGL specs, faqs, links...

   http://www.OpenGL.org/  --  much of the above, still under construction.

   http://www.dec.com.com/pub/doc/opengl/ -- Hypertext OpenGL man pages.

   http://reality.sgi.com/mjk_asd/ -- Mark Kilgard's webpage, 
                                      demos (and Mesa patch required 
                                      for some of them), technical papers,
                                      OpenGL evangalism. For links galore: 

      http://reality.sgi.com/employees/mjk_asd/opengl-links.html 
   
   http://www.ssec.wisc.edu/~brianp/Mesa.html -- The Mesa web page,

   http://www.cs.utah.edu/~sparker/xfree86-3d/  -- Steven Parker's web page. 

   http://www.XFree86.org/  -- XFree86 web page.


   ************************ Build & Install ***************************
 
 
                       ********* Binaries *********

1) Untar and make install (as root).

             ********* Dynamically Loaded Module *********

1) Get the sources for a version of XFree86 with glx server module
   support. This currently would require 3.2Xc, 3.9b, or later.

   Note that you will need to be on the XFree86 beta team in order
   to obtain the XFree86 sources that support this package. XFree86
   3.3 will be the first public release with "hooks" for this package. 
   This package will, however, not be distributed with XFree86 3.3.          

   In the xc/config/cf/xf86site.def file the following setting are required:

       #define DoLoadableServer        NO         (3.9+, defaults to YES
                                                   on comaptible platforms))

       #define BuildDynamicLoading     YES        (3.2-3.3, default on 
                                                   compatible platforms)

       #define BuildGlxExt             YES        (default) 


2) Build and install the XFree86 server with the glx server module support.

   With 0.7 of this package it is not strictly necessay to have built
   and installed the XFree86 package from sources. The GLX Imakefiles 
   are configured to get Imake configuration from the XFree86 source
   tree rather than the system installed location. However, the installed 
   XFree86 binaries will have to have been built to support the 
   dynamically loaded GLX module.

3) Extract the glx server sources into a working directory.

4) Get a recent release (2.5) of Mesa and extract into a working 
   directory. 

5) In the glx package root directory, edit the Config file and set XSERVTOP 
   to the full pathname of the XFree86 source xc directory. 

   e.g.: XSERVTOP = /usr/src/X11R6_build/xc

6) In the same file set MESATOP to the full pathname of the Mesa source 
   directory.

   e.g. MESATOP = /usr/local/Mesa-2.5

7) You will need tclsh (7.4 or newer) in your path somewhere - it is used
   to generate some of the automatically generated code.

8) Build and install the glx server parent directory.

   e.g.:   xmkmf 
           make Makefile
           make Makefiles 
           make
           make install     (as root)

   Installs: servGL/glx.so to /usr/X11R6/lib/modules (X server loadable module)
             libGL/libGL.so* to /usr/X11R6/lib (client GLX encoding library)

9) In the XF86Config files modules section add:

     Load "glx.so"


             ********* Statically Linked Library *********

1) Get the sources for a version of XFree86 with glx server module
   support. This currently would require 3.2Xc, 3.9b, or later.

   Note that you will need to be on the XFree86 beta team in order
   to obtain the XFree86 sources that support this package. XFree86
   3.3 will be the first public release with "hooks" for this package. 
   This package will, however, not be distributed with XFree86 3.3.          

   In the xc/config/cf/xf86site.def file the following setting are required:

       #define DoLoadableServer        NO         (3.9+, generally 
                                                   defaults to YES)

       #define BuildDynamicLoading     NO         (for pre-3.9 defaults to
                                                   YES on compatible platforms)

       #define BuildGlxExt             YES        (default) 


2) Build and install the XFree86 server.

3) Extract the glx server sources into a working directory.

4) Get a recent release (2.5) of Mesa and extract into a working 
   directory. 

5) In the glx package root directory, edit the Config file and set XSERVTOP
   to the full pathname of the XFree86 source xc directory.

   e.g.: XSERVTOP = /usr/src/X11R6_build/xc

6) In the same file set MESATOP to the full pathname of the Mesa source 
   directory.

   e.g. MESATOP = /usr/local/Mesa-2.5

7) You will need tclsh (7.4 or newer) in your path somewhere - it is used
   to generate some of the automatically generated code.

8) Build and install the glx server parent directory.

   e.g.:   xmkmf 
           make Makefile
           make Makefiles 
           make
           make install     (as root) 

9) In the xc/config/cf/xf86site.def you must specified the space-seperated
   pathnames yf the glx and mesa server libraries in servGL (note the
   trailing backslash).

    #define GlxStaticServerLib      /full/path/name/glx/servGL/libServerGlx.a \
                                    /full/path/name/glx/servGL/libMesaGlx.a

10) Go to xc/programs/Xserver and relink the servers:

    e.g.:   make Makefile
            rm XF86_*
            make 
            make install    (as root)


    Note: it's also possible to just make install the tmpl files after step 1
          from within the xc/config/cf directory, make the glx package, step 10, 
          make and install the full xc tree.  
                     
                       ****************************

Henry Worth -- XFree86 Team, 3 June 1997
haworth@wco.com


