function initGL(canvas){
	var gl = null;
	try {
		gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
	}
	catch (e){}

	if (!gl){
		alert("Unable to initialize WebGL. Your browser may not support it.");
		return null;
	}
	if (!gl.getExtension("OES_texture_float")){
		alert("Unable to get OES_texture_float extension. The image may not converge properly");
		texture_type = gl.UNSIGNED_BYTE;
		return gl;
	}
	else {
		texture_type = gl.FLOAT;
	}
	return gl;
}
// will return null and alert the user if we couldn't initialize a WebGL context
will return null and alert the user if we couldn't initialize a WebGL context
will return null and alert the user if we couldn ' t initialize a WebGL context
function initGL(canvas){
	var gl = null;
	try {
		gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
	}
	catch (e){}
	if (!gl){
		alert("Unable to initialize WebGL. Your browser may not support it.");
		return null;
	}
	if (!gl.getExtension("OES_texture_float")){
		alert("Unable to get OES_texture_float extension. The image may not converge properly");
		texture_type = gl.UNSIGNED_BYTE;
		return gl;
	}
	else {
		texture_type = gl.FLOAT;
	}
	return gl;
}
function initGL ( canvas ) { var gl = null ; try { gl = canvas . getContext ( "webgl" ) || canvas . getContext ( "experimental-webgl" ) ; } catch ( e ) { } if ( ! gl ) { alert ( "Unable to initialize WebGL. Your browser may not support it." ) ; return null ; } if ( ! gl . getExtension ( "OES_texture_float" ) ) { alert ( "Unable to get OES_texture_float extension. The image may not converge properly" ) ; texture_type = gl . UNSIGNED_BYTE ; return gl ; } else { texture_type = gl . FLOAT ; } return gl ; }
will return null and alert the user if we couldn't initialize a WebGL context
will return null and alert the user if we couldn ' t initialize a WebGL context