A 2D render-texture (frame buffer object) for use with kami.
var fbo = glwidth: 256height: 256format: glRGB;//binds the frame buffer for your render-to-texture ops//this also sets the viewport to the FBO sizefbo;// ... draw to it ...//unbinds the framebuffer (binds null fbo)//this resets the viewport to the context sizefbo;
widththe width of the texture, must be >= 1
heightthe height of the texture, must be >= 1
formatthe format of the texture, default gl.RGBA
textureoptional; a kami-texture to use instead of creating a new one
end() resets the viewport to the context size, by querying the width and height of the passed
gl context. If you've passed a simple WebGLRenderingContext, it will use the canvas width and height. This may cause problems if your canvas width and height is scaled for retina displays.
If you passed a
height of the context do not represent the retina-scaled sizes, so it should be all good.
MIT, see LICENSE.md for details.