src/render/RenderWebGL.js
/**
 * base WebGL layer cache class
 *
 * @param render is a RenderWebGL instance
 * @param layer is a RenderLayer instance
 * @returns {RenderWebGLLayer}
 */
base WebGL layer cache class
@param render is a RenderWebGL instance
@param layer is a RenderLayer instance
@returns {RenderWebGLLayer}
base WebGL layer cache class @param render is a RenderWebGL instance @param layer is a RenderLayer instance @returns { RenderWebGLLayer }
function RenderWebGLLayer(render, layer) {
    if (render !== undefined) {
        assert(render instanceof RenderWebGL && layer instanceof RenderLayer);
        this.render = render;
        this.layer = layer;
        this.image = layer.image;
        this.verticesBuffer = render.gl.createBuffer();
        this.verticesBuffer.itemSize = 2;
        this.coordinatesBuffer = render.gl.createBuffer();
        this.coordinatesBuffer.itemSize = 2;
    }
}
function RenderWebGLLayer ( render , layer ) { if ( render !== undefined ) { assert ( render instanceof RenderWebGL && layer instanceof RenderLayer ) ; this . render = render ; this . layer = layer ; this . image = layer . image ; this . verticesBuffer = render . gl . createBuffer ( ) ; this . verticesBuffer . itemSize = 2 ; this . coordinatesBuffer = render . gl . createBuffer ( ) ; this . coordinatesBuffer . itemSize = 2 ; } }
base WebGL layer cache class
 @param render is a RenderWebGL instance
 @param layer is a RenderLayer instance
 @returns {RenderWebGLLayer}
base WebGL layer cache class @param render is a RenderWebGL instance @param layer is a RenderLayer instance @returns { RenderWebGLLayer }
// create buffers