    Silicon Graphics GLX Source Release
    February 16, 1999

    This document outlines the initial release of the GLX source code; it
    describes what's included, what's missing, how to add the code to an
    XFree86 source tree and build with it, and outlines where we're going
    from here.

    Background information about GLX and the source release can be found at

	http://www.sgi.com/software/opensource/glx/


LICENSING

    GLX comes under the GLX Public License. While an ASCII text copy
    of the license is provided for reference purposes only, the master
    copy of the license can be found at URL

	http://www.sgi.com/software/opensource/glx/license.html

    Two specification documents (the abstract GLX API spec, and the GLX
    protocol encoding) included with the GLX distribution fall under a more
    traditional copyright allowing use, but not modification. The reasons
    for this restriction are that the contents of these specifications is
    controlled by the OpenGL Architecture Review Board, and is critical to
    interoperability of GLX implementations.


WHAT'S INCLUDED - AND WHAT'S NOT INCLUDED

    GLX is used to connect an X server and an OpenGL implementation. By
    itself, the GLX distribution is incomplete. XFree86 (or other code based
    on the X11R6 release) provides the X server.

    SGI DOES NOT INCLUDE an implementation of OpenGL in this public source
    code release. This means that YOU CANNOT BUILD AN X SERVER WITH GLX
    WITHOUT ADDING AN OPENGL IMPLEMENTATION OBTAINED ELSEWHERE.

    There are at least two ways to obtain such an implementation:

      - SGI provides our OpenGL Sample Implementation (SI) under commercial
	license. Many 3D hardware vendors already have the SGI SI license
	and can use that code together with GLX if they choose.

      - For a fully open source solution, Precision Insight, Inc. is
	adapting Mesa to work with SGI's GLX. More information about Mesa
	and Precision Insight's project can respectively be found at

	    http://www.mesa3d.org
	    http://www.precisioninsight.com

    We are cooperating with Precision Insight to ensure that both Mesa and
    SI-based code will work interchangably with GLX. We expect both Mesa and
    the SI to be used in the future for creating 3D hardware drivers.

    Please do not deluge SGI with requests to make our SI available as open
    source. We are fully aware of the issues involved.


CONTACTS

    SGI has created the glx-discuss mailing list for free-form discussion of
    technical and non-technical GLX issues. To subscribe to the list, send a
    message containing "subscribe glx-discuss" to majordomo@engr.sgi.com.
    Members of SGI's core OpenGL engineering team participate in the list.
    Announcements of future revisions of GLX will be made on this list.


DIRECTORY STRUCTURE

    GLX extracts into the following directory hierarchy:

    glx			Contains toplevel README file and GLX license
    glx/xc		Additions to XFree86 source tree
    glx/xc/doc		Man pages and specifications
    glx/xc/lib/GL	Client library source code
    glx/xc/include/GL	Client header files
    glx/xc/programs/Xserver/GL
			Server source code
    glx/xc/programs/Xserver/GL/opengl
			Server OpenGL goes here (NOT INCLUDED)
    glx/xc/programs/Xserver/include/GL
			Server header files

    Everything under the 'xc' directory is designed to drop into the
    corresponding location in the XFree86 3.3.3 source tree.


SUPPORTED PLATFORMS

    As distributed, GLX drops into an XFree86 3.3.3 source tree. However, we
    expect most future development to take place in the next major XFree86
    release (4.0). The XFree86 development model is semi-open; if you wish
    to work with XFree86 4.0 prior to its public release, you'll need to
    join XFree86 as a developer. For more information on this, see

	http://www.xfree86.org.


BUILDING

    The following instructions refer to XFree86 3.3.3. They assume that you
    have source to a complete OpenGL implementation available. Again, you
    WILL NOT SUCCEED in building a GLX-enabled server without such an
    implementation.

    1) Copy the entire GLX directory hierarchy

	    glx/xc

	into the corresponding xc/ directory of the target XFree86 3.3.3
	source tree.

    2) Add the following definitions to xc/config/cf/host.def:

	    #define GlxModule NO
	    #define BuildGlxExt YES
	    #define GlxStaticServerLib GL/LibraryTargetName(dixGL) \
				       GL/opengl/LibraryTargetName(GL)
	    #define GlxStaticServerDir GL

	Setting BuildGlxExt causes the build to descend into the GLX client
	(xc/lib/GL) and server (xc/programs/Xserver/GL) directories and
	build libraries there.

    3) Apply the following patch to

	    xc/programs/Xserver/Imakefile

	This will cause the server GLX library to be built when BuildGlxExt
	is defined and the non-stub Glx library is being built:

*** #Imakefile	Tue Feb 16 05:24:36 1999
--- Imakefile	Mon Feb 15 23:13:59 1999
***************
*** 48,54 ****
	  GLXDIR = glxStub
  #else
	  GLXLIB = GlxStaticServerLib
!	  GLXDIR =
  #endif
  #endif

--- 48,54 ----
	  GLXDIR = glxStub
  #else
	  GLXLIB = GlxStaticServerLib
!	  GLXDIR = GlxStaticServerDir
  #endif
  #endif


    4) Apply the following patch to

	    xc/lib/Imakefile

	This will cause the client GLX library to be built when BuildGlxExt
	is defined.

*** #Imakefile	Tue Feb 16 04:14:20 1999
--- Imakefile	Tue Feb 16 04:21:48 1999
***************
*** 57,62 ****
--- 57,66 ----
  XALIBDIR = Xa
  #endif

+ #if BuildGlxExt
+ GLXLIBDIR = GL
+ #endif
+
  FONTSUBDIR = font

  #if !BuildServersOnly
***************
*** 65,71 ****
	     Xmu Xaw XIE Xi Xtst FS \
	     PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \
	     $(XDPMSLIBDIR) \
!	     Xp $(ZLIBDIR)
  #else
  #if XnestServer
  XEXTDIR = Xext
--- 69,75 ----
	     Xmu Xaw XIE Xi Xtst FS \
	     PEX5 $(XKBLIBDIR) $(XKBUILIBDIR) $(LBXUTILDIR) $(XALIBDIR) \
	     $(XDPMSLIBDIR) \
!	     Xp $(ZLIBDIR) $(GLXLIBDIR)
  #else
  #if XnestServer
  XEXTDIR = Xext

    5) Put your OpenGL library implementation in directory

	    xc/programs/Xserver/GL/opengl/

       and modify the provided Imakefile as appropriate. The GLX server
       library in xc/programs/Xserver/GL/ will link with this library.


    6) Edit xc/lib/GL/Imakefile to remove the definition of the Makefile
       variable SUBDIRS starting on line 6. As distributed, SUBDIRS refers
       to directories containing an implementation of the GLU library and of
       the GLw widget. We do not provides these implementations with GLX,
       although Mesa is again an alternate source for this code.

    7) You should be able to build XFree86 normally at this point.


COMING ATTRACTIONS

    SGI will soon update GLX to version 1.3 of the GLX specification
    (required to support features added to OpenGL 1.2). We will also be
    including the scripts and specification files needed to automatically
    regenerate certain client and server GLX source files which handle
    encoding and decoding wire protocol for simpler OpenGL commands. At
    present, only the final generated files are being distributed. The delay
    is because we're still working on migrating the generation tools to work
    on both Irix with Irix utilities, and Linux with GNU utilities.

    Precision Insight's direct rendering infrastructure will probably be
    available in a few months (although this is entirely up to PI's
    schedule). Together with the upcoming XFree86 4.0 release, it will then
    be possible for work on hardware drivers to occur for many boards in
    parallel.
