How to use the textureStorage2D function from bindings

Find comprehensive JavaScript bindings.textureStorage2D code examples handpicked from public code repositorys.

111
112
113
114
115
116
117
118
119
120
121
    throw new TypeError('Expected clearTexImage(WebGLTexture texture, level, format, type, value)');
  }
  return _clearTexImage(texture ? texture._ : 0, level, format, type, data);
}


var _textureStorage2D = gl.textureStorage2D;
gl.textureStorage2D = function textureStorage2D(texture, levels, internalFormat, width, height) {
  if (!(arguments.length === 5 && (texture instanceof gl.WebGLTexture) && typeof levels === 'number' && typeof internalFormat === 'number' && typeof width === 'number' && typeof height === 'number')) {
    //console.log([target, texture, texture instanceof gl.WebGLTexture])
    throw new TypeError('Expected textureStorage2D(WebGLTexture texture, number levels, number internalFormat, number width, number height)');
fork icon0
star icon0
watch icon0

+ 137 other calls in file

Other functions in bindings

Sorted by popularity

function icon

bindings.createKey is the most popular function in bindings (8616 examples)