1 <!DOCTYPE HTML PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
4 <meta http-equiv=
"content-type" content=
"text/html; charset=utf-8">
5 <title>Development Notes
</title>
6 <link rel=
"stylesheet" type=
"text/css" href=
"mesa.css">
11 <h1>The Mesa
3D Graphics Library
</h1>
14 <iframe src=
"contents.html"></iframe>
17 <h1>Development Notes
</h1>
21 <li><a href=
"#extensions">Adding Extensions
</a>
24 <h2 id=
"extensions">Adding Extensions
</h2>
27 To add a new GL extension to Mesa you have to do at least the following.
31 If glext.h doesn't define the extension, edit include/GL/gl.h and add
34 #ifndef GL_EXT_the_extension_name
35 #define GL_EXT_the_extension_name
1
36 /* declare the new enum tokens */
37 /* prototype the new functions */
38 /* TYPEDEFS for the new functions */
43 In the src/mapi/glapi/gen/ directory, add the new extension functions and
44 enums to the gl_API.xml file.
45 Then, a bunch of source files must be regenerated by executing the
46 corresponding Python scripts.
49 Add a new entry to the
<code>gl_extensions
</code> struct in mtypes.h
50 if the extension requires driver capabilities not already exposed by
54 Add a new entry to the src/mesa/main/extensions_table.h file.
57 From this point, the best way to proceed is to find another extension,
58 similar to the new one, that's already implemented in Mesa and use it
62 If the new extension adds new GL state, the functions in get.c, enable.c
63 and attrib.c will most likely require new code.
66 To determine if the new extension is active in the current context,
67 use the auto-generated _mesa_has_##name_str() function defined in
68 src/mesa/main/extensions.h.
71 The dispatch tests check_table.cpp and dispatch_sanity.cpp
72 should be updated with details about the new extensions functions. These
73 tests are run using 'make check'