dist/claygl.es.js
function (renderer) {
        var _gl = renderer.gl;
        for (var attachment in this._textures) {
            var obj = this._textures[attachment];
            if (obj) {
                var texture = obj.texture;
                // FIXME some texture format can't generate mipmap
                if (!texture.NPOT && texture.useMipmap
                    && texture.minFilter === Texture.LINEAR_MIPMAP_LINEAR) {
                    var target = texture.textureType === 'textureCube' ? glenum.TEXTURE_CUBE_MAP : glenum.TEXTURE_2D;
                    _gl.bindTexture(target, texture.getWebGLTexture(renderer));
                    _gl.generateMipmap(target);
                    _gl.bindTexture(target, null);
                }
            }
        }
    }
function (renderer) {
        var _gl = renderer.gl;
        for (var attachment in this._textures) {
            var obj = this._textures[attachment];
            if (obj) {
                var texture = obj.texture;
                // FIXME some texture format can't generate mipmap
                if (!texture.NPOT && texture.useMipmap
                    && texture.minFilter === Texture.LINEAR_MIPMAP_LINEAR) {
                    var target = texture.textureType === 'textureCube' ? glenum.TEXTURE_CUBE_MAP : glenum.TEXTURE_2D;
                    _gl.bindTexture(target, texture.getWebGLTexture(renderer));
                    _gl.generateMipmap(target);
                    _gl.bindTexture(target, null);
                }
            }
        }
    }
function ( renderer ) { var _gl = renderer . gl ; for ( var attachment in this . _textures ) { var obj = this . _textures [ attachment ] ; if ( obj ) { var texture = obj . texture ; // FIXME some texture format can't generate mipmap if ( ! texture . NPOT && texture . useMipmap && texture . minFilter === Texture . LINEAR_MIPMAP_LINEAR ) { var target = texture . textureType === 'textureCube' ? glenum . TEXTURE_CUBE_MAP : glenum . TEXTURE_2D ; _gl . bindTexture ( target , texture . getWebGLTexture ( renderer ) ) ; _gl . generateMipmap ( target ) ; _gl . bindTexture ( target , null ) ; } } } }
Because the data of texture is changed over time, Here update the mipmaps of texture each time after rendered;
Because the data of texture is changed over time Here update the mipmaps of texture each time after rendered ;