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