src/GeometryBase.js
function (renderer) {

        var cache = this._cache;

        cache.use(renderer.__uid__);
        var chunks = cache.get('chunks');
        if (chunks) {
            for (var c = 0; c < chunks.length; c++) {
                var chunk = chunks[c];

                for (var k = 0; k < chunk.attributeBuffers.length; k++) {
                    var attribs = chunk.attributeBuffers[k];
                    renderer.gl.deleteBuffer(attribs.buffer);
                }

                if (chunk.indicesBuffer) {
                    renderer.gl.deleteBuffer(chunk.indicesBuffer.buffer);
                }
            }
        }
        if (this.__vaoCache) {
            var vaoExt = renderer.getGLExtension('OES_vertex_array_object');
            for (var id in this.__vaoCache) {
                var vao = this.__vaoCache[id].vao;
                if (vao) {
                    vaoExt.deleteVertexArrayOES(vao);
                }
            }
        }
        this.__vaoCache = {};
        cache.deleteContext(renderer.__uid__);
    }
function (renderer) {

        var cache = this._cache;

        cache.use(renderer.__uid__);
        var chunks = cache.get('chunks');
        if (chunks) {
            for (var c = 0; c < chunks.length; c++) {
                var chunk = chunks[c];

                for (var k = 0; k < chunk.attributeBuffers.length; k++) {
                    var attribs = chunk.attributeBuffers[k];
                    renderer.gl.deleteBuffer(attribs.buffer);
                }

                if (chunk.indicesBuffer) {
                    renderer.gl.deleteBuffer(chunk.indicesBuffer.buffer);
                }
            }
        }
        if (this.__vaoCache) {
            var vaoExt = renderer.getGLExtension('OES_vertex_array_object');
            for (var id in this.__vaoCache) {
                var vao = this.__vaoCache[id].vao;
                if (vao) {
                    vaoExt.deleteVertexArrayOES(vao);
                }
            }
        }
        this.__vaoCache = {};
        cache.deleteContext(renderer.__uid__);
    }
function ( renderer ) { var cache = this . _cache ; cache . use ( renderer . __uid__ ) ; var chunks = cache . get ( 'chunks' ) ; if ( chunks ) { for ( var c = 0 ; c < chunks . length ; c ++ ) { var chunk = chunks [ c ] ; for ( var k = 0 ; k < chunk . attributeBuffers . length ; k ++ ) { var attribs = chunk . attributeBuffers [ k ] ; renderer . gl . deleteBuffer ( attribs . buffer ) ; } if ( chunk . indicesBuffer ) { renderer . gl . deleteBuffer ( chunk . indicesBuffer . buffer ) ; } } } if ( this . __vaoCache ) { var vaoExt = renderer . getGLExtension ( 'OES_vertex_array_object' ) ; for ( var id in this . __vaoCache ) { var vao = this . __vaoCache [ id ] . vao ; if ( vao ) { vaoExt . deleteVertexArrayOES ( vao ) ; } } } this . __vaoCache = { } ; cache . deleteContext ( renderer . __uid__ ) ; }
Dispose geometry data in GL context.
@param {clay.Renderer} renderer
Dispose geometry data in GL context .