Clone of mesa.
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. <HTML>
  2. <TITLE>Development Notes</TITLE>
  3. <BODY text="#000000" bgcolor="#55bbff" link="#111188">
  4. <H1>Development Notes</H1>
  5. <H2>Adding Extentions</H2>
  6. <p>
  7. To add a new GL extension to Mesa you have to do the following.
  8. <pre>
  9. If glext.h doesn't define the extension, edit include/GL/gl.h and add:
  10. - new enum tokens
  11. - new API function entry points
  12. - #define GL_EXT_the_extension_name 1
  13. If adding a new API function (call it glNewFunctionEXT):
  14. - insert glNewFunctionEXT()into src/apiext.h
  15. - edit src/types.h and add NewFunction to the gl_api_table struct
  16. - implement gl_NewFunction() in the appropriate src file
  17. - hook gl_NewFunction() into pointers.c
  18. - add display list support in dlist.c for save_NewFunction()
  19. - add glNewFunctionEXT to gl_GetProcAddress() in extensions.c or
  20. in the device driver's GetProcAddress() function if appropriate
  21. </pre>
  22. <p>
  23. If adding new GL state be sure to update get.c and enable.c
  24. </p>
  25. <p>
  26. In general, look for an extension similar to the new one that's already
  27. implemented in Mesa and follow it by example.
  28. </p>
  29. <H2>Coding Style</H2>
  30. <p>
  31. Mesa's code style has changed over the years. Here's the latest.
  32. </p>
  33. <p>
  34. Comment your code! It's extremely important that open-source code be
  35. well documented. Also, strive to write clean, easily understandable code.
  36. </p>
  37. <p>
  38. 3-space indentation
  39. </p>
  40. <p>
  41. If you use tabs, set them to 8 columns
  42. </p>
  43. <p>
  44. Brace example:
  45. </p>
  46. <pre>
  47. if (condition) {
  48. foo;
  49. }
  50. else {
  51. bar;
  52. }
  53. </pre>
  54. <p>
  55. Here's the GNU indent command which will best approximate my preferred style:
  56. </p>
  57. <pre>
  58. indent -br -i3 -npcs infile.c -o outfile.c
  59. </pre>
  60. <p>
  61. Local variable name example: localVarName (no underscores)
  62. </p>
  63. <p>
  64. Constants and macros are ALL_UPPERCASE, with _ between words
  65. </p>
  66. <p>
  67. Global vars not allowed.
  68. </p>
  69. <p>
  70. Function name examples:
  71. </p>
  72. <pre>
  73. glFooBar() - a public GL entry point (in dispatch.c)
  74. _mesa_FooBar() - the internal immediate mode function
  75. save_FooBar() - retained mode (display list) function in dlist.c
  76. foo_bar() - a static (private) function
  77. _mesa_foo_bar() - an internal non-static Mesa function
  78. </pre>
  79. <H2>Writing a Device Driver</H2>
  80. <p>
  81. XXX to do
  82. </p>
  83. <H2>Making a New Mesa Release</H2>
  84. <p>
  85. These are the instructions for making a new Mesa release.
  86. </p>
  87. <p>
  88. Prerequisites (later versions may work):
  89. </p>
  90. <ul>
  91. <li> autoconf 2.50
  92. <li> automake 1.4-p2
  93. <li> libtool 1.4
  94. </ul>
  95. <p>
  96. Be sure to do a "cvs update -d ." in the Mesa directory to
  97. get all the latest files.
  98. </p>
  99. <p>
  100. Update the version strings in src/get.c and src/X/fakeglx.c to return
  101. the new Mesa version number.
  102. </p>
  103. <p>
  104. Create/edit the docs/RELNOTES-X-Y file to document what's new in the release.
  105. Edit the docs/VERSIONS file too.
  106. Update the docs/IAFA-PACKAGE file.
  107. </p>
  108. <p>
  109. Edit Make-config and change the MESA_MAJOR and/or MESA_MINOR versions.
  110. </p>
  111. <p>
  112. Edit the GNU configure stuff to change versions numbers as needed:
  113. Update the version string (second argument) in the line
  114. "AM_INIT_AUTOMAKE(Mesa, 3.3)" in the configure.in file.
  115. </p>
  116. <p>
  117. Remove the leading `dnl' from the line "dnl AM_MAINTAINER_MODE".
  118. </p>
  119. <p>
  120. Verify the version numbers near the top of configure.in
  121. </p>
  122. <p>
  123. Run "fixam -f" to disable automatic dependency tracking.
  124. </p>
  125. <p>
  126. Run the bootstrap script to generate the configure script.
  127. </p>
  128. <p>
  129. Edit Makefile.X11 and verify DIRECTORY is set correctly. The Mesa
  130. sources must be in that directory (or there must be a symbolic link).
  131. </p>
  132. <p>
  133. Edit Makefile.X11 and verify that LIB_NAME and DEMO_NAME are correct.
  134. If it's a beta release, be sure the bump up the beta release number.
  135. </p>
  136. <p>
  137. cp Makefile.X11 to Makefile so that the old-style Mesa makefiles
  138. still work. ./configure will overwrite it if that's what the user runs.
  139. </p>
  140. <p>
  141. Make a symbolic link from $(DIRECTORY) to Mesa. For example,
  142. ln -s Mesa Mesa-3.3 This is needed in order to make a correct
  143. tar file in the next step.
  144. </p>
  145. <p>
  146. Make the distribution files. From inside the Mesa directory:
  147. <pre>
  148. make -f Makefile.X11 lib_tar
  149. make -f Makefile.X11 demo_tar
  150. make -f Makefile.X11 lib_zip
  151. make -f Makefile.X11 demo_zip
  152. </pre>
  153. <p>
  154. Copy the distribution files to a temporary directory, unpack them,
  155. compile everything, and run some demos to be sure everything works.
  156. </p>
  157. <p>
  158. Upload the *.tar.gz and *.zip files to ftp.mesa3d.org
  159. </p>
  160. <p>
  161. Update the web site. CJ Beyer (cj@styx.phy.vanderbilt.edu) can
  162. help with this and uploading to the ftp site.
  163. </p>
  164. <p>
  165. Make the announcement to the SourceForge.net sites: mesa3d-dev@lists.sf.net,
  166. mesa3d-users@lists.sf.net and mesa3d-announce@lists.sf.net
  167. </p>
  168. <H2>Autoconf info</H2>
  169. <p>
  170. In order to run the bootstrap script you'll need:
  171. <p>
  172. <pre>
  173. autoconf 2.50
  174. automake 1.4-p5
  175. libtool 1.4
  176. </pre>
  177. </body>
  178. </html>