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

m
(Created page with "'''Adapted from {{bug|728354}}''' Extension drafts for WebGL are found at the [http://www.khronos.org/registry/webgl/extensions/ Khronos WebGL Extension Registry]. Good models ...")
 
Line 11: Line 11:
===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 spec to {{moz-central|dom/interfaces/canvas/nsIDOMWebGLRenderingContext.idl}}, with a new UUID:


Let's call this interface, nsIWebGLExtensionFooBar. A C++ header will be auto-generated from that IDL, and will define a nsIWebGLExtensionFooBar class. But that's just a base class. Below we'll manually define a WebGLExtensionFooBar (notice: no nsI prefix) class, inheriting nsIWebGLExtensionFooBar.
Let's call this interface, nsIWebGLExtensionFooBar. A C++ header will be auto-generated from that IDL, and will define a nsIWebGLExtensionFooBar class. But that's just a base class. Below we'll manually define a WebGLExtensionFooBar (notice: no nsI prefix) class, inheriting nsIWebGLExtensionFooBar.
Confirmed users
94

edits