I’ve found this:
http://code.google.com/p/chromium/source/browse/trunk/samples/webgl/procedural-texture-test/?r=1328
It’s working fine with chrome, but I’ve tried it in Mozilla and it’s throwing an error:
[Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsICanvasRenderingContextWebGL.texImage2D]" nsresult: "0x80004005 (NS_ERROR_FAILURE)" location: "JS frame :: file:///D:/%C5%81UKALDO/webGL/chromium/demo.js :: createCheckerboardTexture :: line 208" data: no]
The line with error is:
gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGB, 2, 2, 0, gl.RGB, gl.UNSIGNED_BYTE, pixels);
Did you tried passing textures like this?