index.js
function(domObject, format, type, genMipmaps) {
		var gl = this.gl;

		format = format || gl.RGBA;
		type = type || gl.UNSIGNED_BYTE;
		
		this.width = domObject.width;
		this.height = domObject.height;

		this._checkPOT();

		this.bind();

		gl.texImage2D(this.target, 0, format, format,
					  type, domObject);

		if (genMipmaps)
			gl.generateMipmap(this.target);
	}
function(domObject, format, type, genMipmaps) {
		var gl = this.gl;

		format = format || gl.RGBA;
		type = type || gl.UNSIGNED_BYTE;
		
		this.width = domObject.width;
		this.height = domObject.height;

		this._checkPOT();

		this.bind();

		gl.texImage2D(this.target, 0, format, format,
					  type, domObject);

		if (genMipmaps)
			gl.generateMipmap(this.target);
	}
function ( domObject , format , type , genMipmaps ) { var gl = this . gl ; format = format || gl . RGBA ; type = type || gl . UNSIGNED_BYTE ; this . width = domObject . width ; this . height = domObject . height ; this . _checkPOT ( ) ; this . bind ( ) ; gl . texImage2D ( this . target , 0 , format , format , type , domObject ) ; if ( genMipmaps ) gl . generateMipmap ( this . target ) ; }
Uploads ImageData, HTMLImageElement, HTMLCanvasElement or
HTMLVideoElement.

@method  uploadImage
@param  {Object} domObject the DOM image container
@param  {GLenum} format the format, default gl.RGBA
@param  {GLenum} type the data type, default gl.UNSIGNED_BYTE
@param  {Boolean} genMipmaps whether to generate mipmaps after uploading the data, default false
Uploads ImageData HTMLImageElement HTMLCanvasElement or HTMLVideoElement .