I am having some problems with three js. I wanted to make a line shader that fades and asked for help here and it works really good for windows and linux pcs. How to make a Line2 fading out shader
Turns out this does not work on macs and I am trying to figure out why. The error I am getting is:
[.WebGL-0x10c0c08a900] GL_INVALID_OPERATION: Vertex buffer is not big enough for the draw call
What I am doing:
const geometry = new LineGeometry(); const line = new Line2(geometry, material); geometry.setPositions(positions); // positions is a number scene.add(line)
Later on in the code I do:
geometry.setPositions(positions); // also a number
And this gives me that error, but only on Apple Mac computers (and maybe phones have not tested them). Why does it do this and why does it work on windows/linux but not on mac? Is it because of the architecture or maybe different implementation of WebGL? Any easy way to solve this or do I have to make a new Line() each time? (I also use setColor(color) where I do the setPositions and removing that changes nothing).