Closed Zaitsev closed 4 years ago
Should it be like this?
function resizeTexture(gl, tex, options, width, height,depth) { depth = depth || options.depth; . . . if (target === gl.TEXTURE_CUBE_MAP) { for (var ii = 0; ii < 6; ++ii) { gl.texImage2D(gl.TEXTURE_CUBE_MAP_POSITIVE_X + ii, level, internalFormat, width, height, 0, format, type, null); } }else if (target === gl.TEXTURE_3D || target === gl.TEXTURE_2D_ARRAY) { gl.texImage3D(target, level, internalFormat, width, height, depth, 0, format, type, null) else { gl.texImage2D(target, level, internalFormat, width, height, 0, format, type, null); }
also it would be nice to extract options from texture itself if it possible and options is undefined|null
options
https://github.com/greggman/twgl.js/commit/4acd2c99277e3337d8a06db1a60d25e11cadc259
Should it be like this?
also it would be nice to extract
options
from texture itself if it possible andoptions
is undefined|null