Platform/GFX/WebGL/Contribute/Extensions: Difference between revisions

Jump to navigation Jump to search
Line 12: Line 12:


===Adding the IDL===
===Adding the IDL===
Add the IDL from the spec to {{moz-central|dom/interfaces/canvas/nsIDOMWebGLRenderingContext.idl}}, with a new UUID.
Add the IDL from the extension spec to {{moz-central|dom/webidl/WebGLRenderingContext.webidl}}. For the interface name, instead of the one given in the extension spec, try to choose a name more in line with existing interface names here. For example, for WEBGL_foo_bar, you could choose WebGLFooBar.


Let's call this interface, <code>nsIWebGLExtensionFooBar</code>. A C++ header will be auto-generated from that IDL, and will define a <code>nsIWebGLExtensionFooBar</code> class. But that's just a base class. Below we'll manually define a <code>WebGLExtensionFooBar</code> (notice: no nsI prefix) class, inheriting <code>nsIWebGLExtensionFooBar</code>.
Do not use any prefix here (like MOZ_ or EXT_), or in general elsewhere. Prefixes are only wanted in the extension string.
 
Here like in other places where all WebGL extensions are listed, please preserve alphabetic order.


===The Goop===
===The Goop===
Confirmed users
753

edits

Navigation menu