3 <TITLE>Development Notes
</TITLE>
5 <link rel=
"stylesheet" type=
"text/css" href=
"mesa.css"></head>
9 <H1>Development Notes
</H1>
12 <H2>Adding Extentions
</H2>
15 To add a new GL extension to Mesa you have to do at least the following.
19 If glext.h doesn't define the extension, edit include/GL/gl.h and add
22 #ifndef GL_EXT_the_extension_name
23 #define GL_EXT_the_extension_name
1
24 /* declare the new enum tokens */
25 /* prototype the new functions */
26 /* TYPEDEFS for the new functions */
31 In the src/mesa/glapi/ directory, add the new extension functions and
32 enums to the gl_API.xml file.
33 Then, a bunch of source files must be regenerated by executing the
34 corresponding Python scripts.
37 Add a new entry to the
<code>gl_extensions
</code> struct in mtypes.h
40 Update the
<code>extensions.c
</code> file.
43 From this point, the best way to proceed is to find another extension,
44 similar to the new one, that's already implemented in Mesa and use it
48 If the new extension adds new GL state, the functions in get.c, enable.c
49 and attrib.c will most likely require new code.
58 Mesa's code style has changed over the years. Here's the latest.
62 Comment your code! It's extremely important that open-source code be
63 well documented. Also, strive to write clean, easily understandable code.
71 If you use tabs, set them to
8 columns
87 Here's the GNU indent command which will best approximate my preferred style:
90 indent -br -i3 -npcs --no-tabs infile.c -o outfile.c
95 Local variable name example: localVarName (no underscores)
99 Constants and macros are ALL_UPPERCASE, with _ between words
103 Global variables are not allowed.
107 Function name examples:
110 glFooBar() - a public GL entry point (in dispatch.c)
111 _mesa_FooBar() - the internal immediate mode function
112 save_FooBar() - retained mode (display list) function in dlist.c
113 foo_bar() - a static (private) function
114 _mesa_foo_bar() - an internal non-static Mesa function
118 <H2>Making a New Mesa Release
</H2>
121 These are the instructions for making a new Mesa release.
124 <H3>Get latest source files
</H3>
126 Use
"cvs update -dAP " to get the latest Mesa files from CVS.
130 <H3>Verify and update version info
</H3>
132 Create/edit the docs/RELNOTES-X.Y file to document what's new in the release.
133 Add the new RELNOTES-X.Y file to
<a href=
"relnotes.html">relnotes.html
</a>.
134 Update the docs/VERSIONS file too.
138 Edit the MESA_MAJOR, MESA_MINOR and MESA_TINY version numbers in
143 Make sure the values in src/mesa/main/version.h are correct.
147 Edit the top-level Makefile and verify that DIRECTORY, LIB_NAME and
148 DEMO_NAME are correct.
152 Update the docs/news.html file and docs/download.html files.
156 Check in all updates to CVS.
160 Tag the CVS files with the release name (in the form
<b>mesa_X_Y
</b>).
164 <H3>Make the tarballs
</H3>
166 Make a symbolic link from $(DIRECTORY) to 'Mesa'. For example,
168 This is needed in order to make a correct tar file in the next step.
172 Make the distribution files. From inside the Mesa directory:
178 After the tarballs are created, the md5 checksums for the files will
180 Add them to the docs/news.html file.
184 Copy the distribution files to a temporary directory, unpack them,
185 compile everything, and run some demos to be sure everything works.
188 <H3>Update the website and announce the release
</H3>
190 Follow the directions on SourceForge for creating a new
"release" and
191 uploading the tarballs.
195 Update the web site by copying the docs/ directory's files to
196 /home/users/b/br/brianp/mesa-www/htdocs/
200 Make an announcement on the mailing lists:
201 <em>m
</em><em>e
</em><em>s
</em><em>a
</em><em>3</em><em>d
</em><em>-
</em><em>d
</em><em>e
</em><em>v
</em><em>@
</em><em>l
</em><em>i
</em><em>s
</em><em>t
</em><em>s
</em><em>.
</em><em>s
</em><em>f
</em><em>.
</em><em>n
</em><em>e
</em><em>t
</em>,
202 <em>m
</em><em>e
</em><em>s
</em><em>a
</em><em>3</em><em>d
</em><em>-
</em><em>u
</em><em>s
</em><em>e
</em><em>r
</em><em>s
</em><em>@
</em><em>l
</em><em>i
</em><em>s
</em><em>t
</em><em>s
</em><em>.
</em><em>s
</em><em>f
</em><em>.
</em><em>n
</em><em>e
</em><em>t
</em>
204 <em>m
</em><em>e
</em><em>s
</em><em>a
</em><em>3</em><em>d
</em><em>-
</em><em>a
</em><em>n
</em><em>n
</em><em>o
</em><em>u
</em><em>n
</em><em>c
</em><em>e
</em><em>@
</em><em>l
</em><em>i
</em><em>s
</em><em>t
</em><em>s
</em><em>.
</em><em>s
</em><em>f
</em><em>.
</em><em>n
</em><em>e
</em><em>t
</em>