docs/dist/videocontext.js
/*
	* Utility function to compile a WebGL Vertex or Fragment shader.
	*
	* @param {WebGLRenderingContext} gl - the webgl context fo which to build the shader.
	* @param {String} shaderSource - A string of shader code to compile.
	* @param {number} shaderType - Shader type, either WebGLRenderingContext.VERTEX_SHADER or WebGLRenderingContext.FRAGMENT_SHADER.
	*
	* @return {WebGLShader} A compiled shader.
	*
	*/
Utility function to compile a WebGL Vertex or Fragment shader.
@param {WebGLRenderingContext} gl - the webgl context fo which to build the shader.
@param {String} shaderSource - A string of shader code to compile.

@return {WebGLShader} A compiled shader.
Utility function to compile a WebGL Vertex or Fragment shader . @param { WebGLRenderingContext } gl - the webgl context fo which to build the shader . @param { String } shaderSource - A string of shader code to compile . @return { WebGLShader } A compiled shader .
function compileShader(gl, shaderSource, shaderType) {
	    var shader = gl.createShader(shaderType);
	    gl.shaderSource(shader, shaderSource);
	    gl.compileShader(shader);
	    var success = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
	    if (!success) {
	        throw "could not compile shader:" + gl.getShaderInfoLog(shader);
	    }
	    return shader;
	}
function compileShader ( gl , shaderSource , shaderType ) { var shader = gl . createShader ( shaderType ) ; gl . shaderSource ( shader , shaderSource ) ; gl . compileShader ( shader ) ; var success = gl . getShaderParameter ( shader , gl . COMPILE_STATUS ) ; if ( ! success ) { throw "could not compile shader:" + gl . getShaderInfoLog ( shader ) ; } return shader ; }
Utility function to compile a WebGL Vertex or Fragment shader.
Utility function to compile a WebGL Vertex or Fragment shader .