home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 2000 April & May / AMIGA_2000_04.iso / patches / mesa3.1 / mesa-3_1.lha / docs / DEVINFO < prev    next >
Encoding:
Text File  |  1999-09-24  |  4.5 KB  |  144 lines

  1.  
  2.  
  3.                       Information for Mesa developers
  4.  
  5.  
  6. Adding Extentions
  7. -----------------
  8.  
  9. To add a new GL extension to Mesa you have to do the following.
  10.  
  11.    Edit include/GL/gl.h and add
  12.     - new enum tokens
  13.     - new API function entry points
  14.     - #define GL_EXT_the_extension_name 1
  15.  
  16.    If adding a new API function (call it glNewFunctionEXT):
  17.     - insert glNewFunctionEXT()into src/apiext.h
  18.     - edit src/types.h and add NewFunction to the gl_api_table struct
  19.     - implement gl_NewFunction() in the appropriate src file
  20.     - hook gl_NewFunction() into pointers.c
  21.     - add display list support in dlist.c for save_NewFunction()
  22.     - add glNewFunctionEXT to gl_GetProcAddress() in extensions.c or
  23.       in the device driver's GetProcAddress() function if appropriate
  24.  
  25.    If adding new GL state be sure to update get.c and enable.c
  26.  
  27.    Document the extension in the README file.  Either include a pointer
  28.    to the extension spec or write an extension spec and put it in the
  29.    Mesa/docs/ directory.
  30.  
  31.  
  32.  
  33. Coding Style
  34. ------------
  35.  
  36. Mesa's code style has changed over the years.  Here's the latest.
  37.  
  38. Comment your code!  It's extremely important that open-source code be
  39. well documented.  Also, strive to write clean, easily understandable code.
  40.  
  41. 3-space indentation
  42.  
  43. If you use tabs, set them to 8 columns
  44.  
  45. Brace example:
  46.  
  47.     if (condition) {
  48.        foo;
  49.     }
  50.     else {
  51.        bar;
  52.     }
  53.  
  54. Local variable name example:  localVarName (no underscores)
  55.  
  56. Constants and macros are ALL UPPERCASE, with _ between words
  57.  
  58. Global vars not allowed.  Think very seriously before adding a new global!
  59.  
  60. Function name examples:
  61.     glFooBar()    - a public GL entry point
  62.     gl_FooBar()   - the internal immediate mode function
  63.     save_FooBar() - retained mode (display list) function in dlist.c
  64.     foo_bar()     - a static (private) function
  65.     gl_foo_bar()  - an internal Mesa function
  66.  
  67.  
  68.  
  69. Writing a Device Driver
  70. -----------------------
  71.  
  72. XXX to do
  73.  
  74.  
  75.  
  76. Making a New Mesa Release
  77. -------------------------
  78.  
  79. These are the instructions for making a new Mesa release.
  80.  
  81. Be sure to do a "cvs update -d ." in the Mesa directory to
  82. get all the latest files.
  83.  
  84. Update the version strings in src/get.c, src-glu/glu.c, and
  85. src/X/fakeglx.c to return the new Mesa version number.
  86.  
  87. Edit the docs/RELNOTES file to document what's new in the release.
  88. Edit the docs/VERSIONS file too.
  89. Update the docs/IAFA-PACKAGE file.
  90.  
  91. Edit the GNU configure stuff to change versions numbers as needed:
  92. Update the version string (second argument) in the line
  93. "AM_INIT_AUTOMAKE(Mesa, 3.1b3)".
  94. Remove the leading `dnl' from the line "dnl AM_MAINTAINER_MODE".
  95. For both LIBGL_VERSION and LIBGLU_VERSION (libGL and libGLU version) do:
  96. * If the library source code has changed at all since the last
  97.   update, then increment REVISION (`C:R:A' becomes `C:R+1:A').
  98. * If any interfaces have been added, removed, or changed since the
  99.   last update, increment CURRENT, and set REVISION to 0.
  100. * If any interfaces have been added since the last public release,
  101.   then increment AGE.
  102. * If any interfaces have been removed since the last public release,
  103.   then set AGE to 0.
  104.  
  105. Run "fixam -f" to disable automatic dependency tracking.
  106. Run the bootstrap script to generate the configure script.
  107. (Requires autoconf 2.13 and automake 1.4, available from ftp.gnu.org)
  108.  
  109. Edit Make-config and change the MESA_MAJOR and/or MESA_MINOR versions.
  110.  
  111. Edit Makefile.X11 and verify DIRECTORY is set correctly.  The Mesa
  112. sources must be in that directory (or there must be a symbolic link).
  113.  
  114. Edit Makefile.X11 and verify that LIB_NAME and DEMO_NAME are correct.
  115. If it's a beta release, be sure the bump up the beta release number.
  116.  
  117. cp Makefile.X11 to Makefile so that the old-style Mesa makefiles
  118. still work.  ./configure will overwrite it if that's what the user runs.
  119.  
  120. Make a symbolic link from $(DIRECTORY) to Mesa.  For example,
  121. ln -s Mesa Mesa-3.1    This is needed in order to make a correct
  122. tar file in the next step.
  123.  
  124. Make the distribution files.  From inside the Mesa directory:
  125.     make -f Makefile.X11 lib_tar
  126.     make -f Makefile.X11 demo_tar
  127.     make -f Makefile.X11 lib_zip
  128.     make -f Makefile.X11 demo_zip
  129.  
  130. Copy the distribution files to a temporary directory, unpack them,
  131. compile everything, and run some demos to be sure everything works.
  132.  
  133. Upload the *.tar.gz and *.zip files to ftp.mesa3d.org
  134.  
  135. Update the web site.  CJ Beyer (cj@styx.phy.vanderbilt.edu) can
  136. help with this and uploading to the ftp site.
  137.  
  138. Make the announcement to mesa-dev@mesa3d.org, mesa@iqm.unicamp.br,
  139. mesa-announce@iqm.unicamp.br and other sites.
  140.  
  141.  
  142. ----------------------------------------------------------------------
  143. $Id: DEVINFO,v 1.7 1999/09/19 20:09:00 tanner Exp $
  144.