Hi,can somebody help me please with this error : WebGL: INVALID_OPERATION: texImage2D: ArrayBufferView not big enough for request ?I don´t understand to that, because ArrayBuffer, that i want to paint isnt big enaught (another one - more bigger - i can paint with any problems)..so where could be problem?Help me please...
code where the error is :i called this :textures.textureYZ.refreshTextureData(gl, texGen.generateYZTexture(), cube3D.width, cube3D.numCuts, gl.RGBA);
refreshTexture method :/*** Actualize texture*/function refreshTextureData(gl, dataArray, width, height, type) {gl.bindTexture(gl.TEXTURE_2D, texture);// ----> HERE IS THE PROBLEMgl.texImage2D(gl.TEXTURE_2D, 0, type, width, height, 0, type, gl.UNSIGNED_BYTE, dataArray);//solution of Power of 2 only textures - we didnt REPEATgl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);gl.bindTexture(gl.TEXTURE_2D, null);}