Confirmed users
753
edits
| Line 75: | Line 75: | ||
===Implementing the Extension=== | ===Implementing the Extension=== | ||
Files that will typically have to be modified in this section (this depends on the extension): | |||
* {{moz-central|content/canvas/src/WebGLContextGL.cpp}} | |||
* {{moz-central|content/canvas/src/WebGLContextGLValidate.cpp}} | |||
* {{moz-central|gfx/gl/GLDefs.h}} | |||
* Any of the above .cpp or .h files | |||
Finally, let's implement what this extension actually does. The spec describes that. | Finally, let's implement what this extension actually does. The spec describes that. | ||
If the extension modifies the behavior of one of the standard WebGL context methods, you will probably have to modify {{moz-central|content/canvas/src/WebGLContextGL.cpp}} as that is where these methods are implemented. You might also need to make some more edits to {{moz-central|content/canvas/src/WebGLContextGLValidate.cpp}}, or to other files in this directory, or to <code>gfx/gl/GLContext.*</code>. | |||
Sometimes, while implementing a WebGL extension, you need a new GL symbolic constant, like <code>TEXTURE_MAX_ANISOTROPY</code>. To achieve this, add #defines for them in {{moz-central|gfx/gl/GLDefs.h}}. Notice we use <code>LOCAL_GL_</code> prefixes there to avoid some conflicts. | |||
===Adding Tests=== | ===Adding Tests=== | ||