summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2004-08-17 14:08:59 +0000
committerBrian Paul <[email protected]>2004-08-17 14:08:59 +0000
commit51830613a941d07e19f38f328657864ca2326111 (patch)
treee41018bf1e2af7cb14c3bac94546f04c1ac22d6a
parent6f3cc6a5226fd4b5d44cca91e2f76216ecaff831 (diff)
some updated info about adding new extensions
-rw-r--r--docs/devinfo.html56
1 files changed, 33 insertions, 23 deletions
diff --git a/docs/devinfo.html b/docs/devinfo.html
index 97e17bc1c0a..c1ddea3e4b9 100644
--- a/docs/devinfo.html
+++ b/docs/devinfo.html
@@ -10,29 +10,39 @@
<H2>Adding Extentions</H2>
<p>
-To add a new GL extension to Mesa you have to do the following.
-<pre>
- If glext.h doesn't define the extension, edit include/GL/gl.h and add:
- - new enum tokens
- - new API function entry points
- - #define GL_EXT_the_extension_name 1
-
- If adding a new API function (call it glNewFunctionEXT):
- - insert glNewFunctionEXT()into src/apiext.h
- - edit src/types.h and add NewFunction to the gl_api_table struct
- - implement gl_NewFunction() in the appropriate src file
- - hook gl_NewFunction() into pointers.c
- - add display list support in dlist.c for save_NewFunction()
- - add glNewFunctionEXT to gl_GetProcAddress() in extensions.c or
- in the device driver's GetProcAddress() function if appropriate
-</pre>
-<p>
-If adding new GL state be sure to update get.c and enable.c
-</p>
-<p>
-In general, look for an extension similar to the new one that's already
-implemented in Mesa and follow it by example.
-</p>
+To add a new GL extension to Mesa you have to do at least the following.
+
+<ul>
+<li>
+ If glext.h doesn't define the extension, edit include/GL/gl.h and add
+ code like this:
+ <pre>
+ #ifndef GL_EXT_the_extension_name
+ #define GL_EXT_the_extension_name 1
+ /* declare the new enum tokens */
+ /* prototype the new functions */
+ /* TYPEDEFS for the new functions */
+ #endif
+ </pre>
+</li>
+<li>
+ In the src/mesa/glapi/ directory, add the new extension functions and
+ enums to the gl_API.xml file.
+ Then, a bunch of source files must be regenerated by executing the
+ corresponding Python scripts.
+</li>
+<li>
+ Find an existing extension that's similar to the new one and search
+ the sources for code related to that extension.
+ Implement new code as needed.
+ In general, new state variables will be added to mtypes.h. If the
+ extension is rather large, try to implement it in a new source file.
+</li>
+<li>
+ If hew extension adds new GL state, the functions in get.c, enable.c
+ and attrib.c will most likely require new code.
+</li>
+</ul>