update script

This commit is contained in:
Pavel Dobryakov
2017-11-30 12:27:31 +03:00
parent 86061ecc50
commit e999415b2f

View File

@@ -30,11 +30,14 @@ function getWebGLContext (canvas) {
if (!isWebGL2)
{ gl = canvas.getContext('webgl', params) || canvas.getContext('experimental-webgl', params); }
var halfFloat = gl.getExtension('OES_texture_half_float');
var support_linear_float = gl.getExtension('OES_texture_half_float_linear');
var halfFloat;
var support_linear_float;
if (isWebGL2) {
gl.getExtension('EXT_color_buffer_float');
support_linear_float = gl.getExtension('OES_texture_float_linear');
} else {
halfFloat = gl.getExtension('OES_texture_half_float');
support_linear_float = gl.getExtension('OES_texture_half_float_linear');
}
gl.clearColor(0.0, 0.0, 0.0, 1.0);
@@ -210,8 +213,12 @@ function createFBO (texId, w, h, internalFormat, format, type, param) {
gl.clear(gl.COLOR_BUFFER_BIT);
var status = gl.checkFramebufferStatus(gl.FRAMEBUFFER);
if (status != gl.FRAMEBUFFER_COMPLETE)
{ ga('send', 'event', 'app', 'init', status); }
if (status != gl.FRAMEBUFFER_COMPLETE) {
ga('send', 'pageview', {
'dimension1': status,
'dimension2': isWebGL2
});
}
return [texture, fbo, texId];
}