src/graphics/gl-textures.js
function(image) {
        if (!this.isActive())
            throw "Trying to set image of texture that isn't active";
        this.width = image.width;
        this.height = image.height;
        this.size = image.width * image.height;
        this.powerOfTwo = !(
            Math.log(image.width) / Math.LN2 !==
                Math.floor(Math.log(image.width) / Math.LN2) ||
            Math.log(image.height) / Math.LN2 !==
                Math.floor(Math.log(image.height) / Math.LN2)
        );
        var gl = this.gl;
        gl.texImage2D(
            gl.TEXTURE_2D,
            0,
            gl.RGBA,
            gl.RGBA,
            gl.UNSIGNED_BYTE,
            image
        );
    }
function(image) {
        if (!this.isActive())
            throw "Trying to set image of texture that isn't active";
        this.width = image.width;
        this.height = image.height;
        this.size = image.width * image.height;
        this.powerOfTwo = !(
            Math.log(image.width) / Math.LN2 !==
                Math.floor(Math.log(image.width) / Math.LN2) ||
            Math.log(image.height) / Math.LN2 !==
                Math.floor(Math.log(image.height) / Math.LN2)
        );
        var gl = this.gl;
        gl.texImage2D(
            gl.TEXTURE_2D,
            0,
            gl.RGBA,
            gl.RGBA,
            gl.UNSIGNED_BYTE,
            image
        );
    }
function ( image ) { if ( ! this . isActive ( ) ) throw "Trying to set image of texture that isn't active" ; this . width = image . width ; this . height = image . height ; this . size = image . width * image . height ; this . powerOfTwo = ! ( Math . log ( image . width ) / Math . LN2 !== Math . floor ( Math . log ( image . width ) / Math . LN2 ) || Math . log ( image . height ) / Math . LN2 !== Math . floor ( Math . log ( image . height ) / Math . LN2 ) ) ; var gl = this . gl ; gl . texImage2D ( gl . TEXTURE_2D , 0 , gl . RGBA , gl . RGBA , gl . UNSIGNED_BYTE , image ) ; }
actually loads an image into the texture object; sets the appropriate metadata
actually loads an image into the texture object ; sets the appropriate metadata