[BACK]Return to README.1st CVS log [TXT][DIR] Up to [Development] / projects / ogl-sample / main

Annotation of projects/ogl-sample/main/README.1st, Revision 1.2

1.2     ! shreiner    1:     Release notes for the OpenGL(R) Sample Implementation (Aug. 4, 2000)
        !             2:     Jon Leech, Craig Dunwoody, Dave Shreiner
1.1       ljp         3:     OpenGL Core Engineering
                      4:     SGI
                      5:
                      6:
                      7: INTRODUCTION
                      8:
                      9:     These notes briefly describe the structure of the Sample
                     10:     Implementation (SI) source tree and how it can be built. These are
                     11:     preliminary, and people who are not highly familiar with building X
                     12:     are likely to have trouble following these instructions.
                     13:
                     14:     Please bear with us as we move into the open source world. We're
                     15:     undergoing a big transition moving from our internal Perforce-based
                     16:     source code repository to the CVS-based repository on
                     17:     http://oss.sgi.com, and we aren't able to build in the wide variety
                     18:     of environments that open source developers have access to. There
                     19:     will be startup pains as people get started using the code. Feedback
                     20:     on problems (and fixes) to the ogl-sample@oss.sgi.com mailing list
                     21:     will be greatly appreciated, so the build process gets easier for
                     22:     everyone.
1.2     ! shreiner   23:
        !            24:     For the latest list of changes to the SI, please see the file
        !            25:     main/doc/release/relnotes.
1.1       ljp        26:
                     27:
                     28: TREE STRUCTURE
                     29:
                     30:     The source tree containing the Sample Implementation (SI) is structured
                     31:     as follows:
                     32:
                     33: doc/man			Source and script tools for GL/GLU/GLX manpages
                     34: doc/release		More detailed release notes
                     35: gfx			GL and GLU libraries
                     36: gfx/lib/glu		    GLU library
                     37: gfx/lib/glw		    GLw Motif widget
                     38: gfx/lib/opengl		    GL core rendering library
                     39: gfx/lib/opengl/defs
                     40: gfx/lib/opengl/include		Internal header files
                     41: gfx/lib/opengl/generated	Generator scripts
                     42: gfx/lib/opengl/glcore		GL core library
                     43: gfx/include
                     44: gfx/include/gl		    GL and GLU headers
                     45: gfx/include/gl/spec		".spec" files for generating API and protocol wrappers
                     46: gfx/include/gl/template		Generator scripts
                     47: gfx/include/gl/internal
                     48: gfx/include/glx		    GLX headers
                     49: gfx/lib/glut		    GLUT library for samples
                     50: gfx/lib/glfont		    Simple font library for samples
                     51: gfx/lib/rgb		    Simple image library for samples
                     52: gfx/samples		    Sample programs (most already open source)
                     53: glx			GLX library
                     54: glx/include		    Headers
                     55: glx/lib			    Client code
                     56: glx/server		    Server code
                     57: tools			Build tools
                     58: tools/man2html		    manpage -> HTML converter
                     59: tools/libspec		    .spec file tools
                     60: tools/include		    GNU make rules/macros
                     61: tools/gfxinstall	    Portable install script
                     62:
                     63:
                     64: BUILDING THE SAMPLE IMPLEMENTATION
                     65:
                     66:     QUICK RECIPE:
                     67:
                     68:       1) Follow the 'BUILDING IN THE SI TREE' instructions below
                     69: 	 to create the generated files.
                     70:       2) Next, follow the 'BUILDING IN THE X TREE' instructions below
                     71: 	 to export SI files to the X tree.
                     72:       3) Finally, follow the instructions in doc/release/build_xfree86
                     73: 	 to modify your X tree to link against and intitialize GL, then
                     74: 	 build the X server.
                     75:
                     76:     MORE DETAILS:
                     77:
                     78:     The tree can be used in two ways. First, the SI can be built
                     79:     entirely within its own tree and the resulting libraries copied into
                     80:     an X11R6 tree and used to build a GLX-capable X server. This is how
                     81:     we usually work at SGI; we'll call this the "SI tree" below. The SI
                     82:     tree is heavily based on GNU make.
                     83:
                     84:     Alternatively, the source tree can be exported into a different
                     85:     structure which fits directly into an X11R6 tree, and is built as
                     86:     part of the X build. This is how the SI is shipped to our licensees;
                     87:     we'll call this "X tree". This uses imake, like everything else in
                     88:     the X11 tree. It's probably going to be easier to build in the X11
                     89:     tree at first, but moving to the SI tree over time is preferable
                     90:     since mapping changes from files in the X tree to the SI tree is
                     91:     tedious.
                     92:
                     93:     There are a number of databases and generator scripts used when
                     94:     building within the SI tree. The generated files include GLX
                     95:     protocol encoder and decoder routines for indirect rendering, header
                     96:     files, and some others. When exporting into the X tree, the
                     97:     generated files are included and the generator scripts are not. The
                     98:     generator scripts are a mix of awk and Perl today; we'd like to move
                     99:     completely to Perl in the near future, for better crossplatform
                    100:     support.
                    101:
                    102:     Unfortunately, the two build processes are somewhat interdependent.
                    103:     To build in the X tree, you must first build (just once) in the SI
                    104:     tree to create the generated files that are part of what's exported.
                    105:     To build in the SI tree and then include the resulting GL/GLX
                    106:     libraries in a new X server, some framework in the X tree is
                    107:     required so it will know to initialize GLX and link against the
                    108:     GL/GLX libraries. Thus the 'QUICK RECIPE' above follows both steps
                    109:     and leaves you with a buildable X tree including GL support.
                    110:
                    111:
                    112: BUILDING IN THE SI TREE
                    113:
                    114:     To build the SI, you must have also have a X11R6/XFree86 source tree
                    115:     to provide X headers. We currently build against XFree86 3.3.5 on
                    116:     Linux and will upgrade to XFree86 4.0 when it goes public in the
                    117:     near future.
                    118:
                    119:     The following environment variables are used by the build. All
                    120:     except GLDEBUG are required.
                    121:
                    122: 	GLDEBUG
                    123: 	    Set GLDEBUG=1 to compile everything with debug flags.
                    124:
                    125: 	GLPRODUCT
                    126: 	    Set GLPRODUCT=DDX. Controls the type of driver to build.
                    127: 	    In the future other drivers will use a different GLPRODUCT
                    128: 	    setting.
                    129:
                    130: 	TOPDIR
                    131: 	    Set TOPDIR to the path to the root of the SI tree (e.g. this
                    132: 	    README.1st file should be under $TOPDIR).
                    133:
                    134: 	ROOT
                    135: 	    Set ROOT to the path to a directory used for installing
                    136: 	    scripts, headers, and libraries generated by the build.
                    137:
                    138: 	    It's almost certainly a bad idea to just set ROOT=/ and
                    139: 	    install directly into /usr/include, /usr/lib, etc. - we
                    140: 	    recommend setting $ROOT=${TOPDIR}/root
                    141:
                    142: 	XTOPDIR
                    143: 	    Set XTOPDIR to the path to the root of your X11R6/XFree86
                    144: 	    source tree (e.g. the 'xc' directory should be under
                    145: 	    $XTOPDIR). This is required to pick up X11 headers used in
                    146: 	    building GLX.
                    147:
                    148:     Once these environment variables are set, you can go to $TOPDIR and
                    149:     'gmake World' (this can take quite awhile and consume a lot of disk
                    150:     space, since a large number of sample programs are built. Later you
                    151:     may wish to just rebuild the client and server libraries).
                    152:
                    153:     If you're going to export to the X tree, go on to the 'BUILDING IN
                    154:     THE X TREE' instructions in the next section. Otherwise:
                    155:
                    156:     The result of 'gmake World' should be a tree under $ROOT including
                    157:     these files:
                    158:
                    159: 	$ROOT/usr/include/GL/*.h    GL, GLX, and GLU header files
                    160: 	$ROOT/usr/lib/libGL.so	    GL/GLX client library
                    161: 		      libGLU.so     GLU client library
                    162: 		      libGLw.a	    Motif GL widget
                    163: 		      libglfont.a   Support libraries for samples
                    164: 		      libglut.a		"
                    165: 		      librgb.a		"
                    166: 		      libdixGL.a    X server GLX library
                    167: 		      libGLcore.a   X server GL library (core renderer)
                    168:
                    169:     libdixGL.a and libGLcore.a will need to be included in your XFree86
                    170:     build. The other libraries are client libraries which can be
                    171:     installed in /usr/lib or just used via LD_LIBRARY_PATH.
                    172:
                    173: BUILDING IN THE X TREE
                    174:
                    175:     The export process requires all the generated files, so you'll need
                    176:     to build in the SI tree once (as described above) first. Once we get
                    177:     the website rolling a bit more, we should be able to regularly put
                    178:     up tarballs of the SI files in the X tree structure distribution on
                    179:     a regular basis, instead of requiring you to do this yourself.
                    180:
                    181:     The next step is to export from the SI tree to the X tree. It's
                    182:     probably best to use an intermediate directory at first, until
                    183:     you're comfortable with the export process - otherwise the chance of
                    184:     scribbling over unexpected parts of the X tree is high. To export:
                    185:
                    186:     1) Set the environment variable 'DIST' to the directory to which the
                    187:        files will be exported, e.g.
                    188:
                    189: 	setenv DIST /tmp/dist
                    190:
                    191:     2) In $TOPDIR, install the build tools:
                    192:
                    193: 	gmake tools_install
                    194:
                    195:     3) Export the files
                    196:
                    197: 	gmake distsi
                    198:
                    199:     After this completes, the following directories will be created
                    200:     under $DIST:
                    201:
                    202: 	xc/include/GL
                    203: 	xc/lib/GL
                    204: 	xc/programs/Xserver/GL
                    205: 	xc/programs/Xserver/include/GL
                    206: 	xc/contrib/GL
                    207: 	xc/doc/man/GL
                    208: 	xc/doc/hardcopy/GL
                    209:
                    210:     These can then be overlaid into your X tree by:
                    211:
                    212: 	(cd $DIST && tar cf - xc) | (cd $XTOPDIR && tar xf -)
                    213:
                    214:     It's also possible to just set DIST=$XTOPDIR if you're confident,
                    215:     and avoid the intermediate step.
                    216:
                    217:     Finally, once you have the files installed in the X tree, refer to
                    218:     $TOPDIR/doc/release/build_xfree86 for instructions on how to modify
                    219:     the XFree86 build to incorporate the SI.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>