I was trying to understand how the WebGL extensions work.
What is not clear to me is if I can add extensions to the Android Browser
myself, and if so, how would I go about that?
If you want to introduce an extension to a browser you're distributing, you've got to modify that browsers webgl context implementation (gl = canvas.getContext('experimental-webgl')) and provide:
- extension = gl.getExtension(name) -> returns the extension object
- gl.getSupportedExtensions() -> a list of strings of supported extension names
- extension -> an object containing whatever enumerants and symbols required by the extension
In some cases an extension changes the behavior of existing functions, which mostly affects error validation on passed arguments (for instance texImage2D for float textures).
In case you're planing on adding a new extension of your own, please consult the ML-archives and grep for my email (firstname.lastname@example.org
) and anisotropic filtering, in short the process is:
- propose an extension as IDL
- post it to the ML
- see if we can reach a consensus over the standardization of it, and it can move to draft
- at that point vendors should be free to implement it