3 <TITLE>Development Notes
</TITLE>
5 <BODY text=
"#000000" bgcolor=
"#55bbff" link=
"#111188">
7 <H1>Development Notes
</H1>
10 <H2>Adding Extentions
</H2>
13 To add a new GL extension to Mesa you have to do the following.
15 If glext.h doesn't define the extension, edit include/GL/gl.h and add:
17 - new API function entry points
18 - #define GL_EXT_the_extension_name
1
20 If adding a new API function (call it glNewFunctionEXT):
21 - insert glNewFunctionEXT()into src/apiext.h
22 - edit src/types.h and add NewFunction to the gl_api_table struct
23 - implement gl_NewFunction() in the appropriate src file
24 - hook gl_NewFunction() into pointers.c
25 - add display list support in dlist.c for save_NewFunction()
26 - add glNewFunctionEXT to gl_GetProcAddress() in extensions.c or
27 in the device driver's GetProcAddress() function if appropriate
30 If adding new GL state be sure to update get.c and enable.c
33 In general, look for an extension similar to the new one that's already
34 implemented in Mesa and follow it by example.
42 Mesa's code style has changed over the years. Here's the latest.
46 Comment your code! It's extremely important that open-source code be
47 well documented. Also, strive to write clean, easily understandable code.
55 If you use tabs, set them to
8 columns
71 Here's the GNU indent command which will best approximate my preferred style:
74 indent -br -i3 -npcs infile.c -o outfile.c
79 Local variable name example: localVarName (no underscores)
83 Constants and macros are ALL_UPPERCASE, with _ between words
87 Global vars not allowed.
91 Function name examples:
94 glFooBar() - a public GL entry point (in dispatch.c)
95 _mesa_FooBar() - the internal immediate mode function
96 save_FooBar() - retained mode (display list) function in dlist.c
97 foo_bar() - a static (private) function
98 _mesa_foo_bar() - an internal non-static Mesa function
102 <H2>Writing a Device Driver
</H2>
110 <H2>Making a New Mesa Release
</H2>
113 These are the instructions for making a new Mesa release.
117 Prerequisites (later versions may work):
126 Be sure to do a
"cvs update -d ." in the Mesa directory to
127 get all the latest files.
131 Update the version strings in src/get.c and src/X/fakeglx.c to return
132 the new Mesa version number.
136 Create/edit the docs/RELNOTES-X-Y file to document what's new in the release.
137 Edit the docs/VERSIONS file too.
138 Update the docs/IAFA-PACKAGE file.
142 Edit Make-config and change the MESA_MAJOR and/or MESA_MINOR versions.
146 Edit the GNU configure stuff to change versions numbers as needed:
147 Update the version string (second argument) in the line
148 "AM_INIT_AUTOMAKE(Mesa, 3.3)" in the configure.in file.
152 Remove the leading `dnl' from the line
"dnl AM_MAINTAINER_MODE".
156 Verify the version numbers near the top of configure.in
160 Run
"fixam -f" to disable automatic dependency tracking.
164 Run the bootstrap script to generate the configure script.
168 Edit Makefile.X11 and verify DIRECTORY is set correctly. The Mesa
169 sources must be in that directory (or there must be a symbolic link).
173 Edit Makefile.X11 and verify that LIB_NAME and DEMO_NAME are correct.
174 If it's a beta release, be sure the bump up the beta release number.
178 cp Makefile.X11 to Makefile so that the old-style Mesa makefiles
179 still work. ./configure will overwrite it if that's what the user runs.
183 Make a symbolic link from $(DIRECTORY) to Mesa. For example,
184 ln -s Mesa Mesa-
3.3 This is needed in order to make a correct
185 tar file in the next step.
189 Make the distribution files. From inside the Mesa directory:
191 make -f Makefile.X11 lib_tar
192 make -f Makefile.X11 demo_tar
193 make -f Makefile.X11 lib_zip
194 make -f Makefile.X11 demo_zip
198 Copy the distribution files to a temporary directory, unpack them,
199 compile everything, and run some demos to be sure everything works.
203 Upload the *.tar.gz and *.zip files to ftp.mesa3d.org
207 Update the web site. CJ Beyer (cj@styx.phy.vanderbilt.edu) can
208 help with this and uploading to the ftp site.
212 Make the announcement to the SourceForge.net sites: mesa3d-dev@lists.sf.net,
213 mesa3d-users@lists.sf.net and mesa3d-announce@lists.sf.net
217 <H2>Autoconf info
</H2>
220 In order to run the bootstrap script you'll need: