Vertex buffer is not big enough for the draw call only on mac computers


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[]

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).

1 Like

Have also just ran into this. Shall update the thread if I find a solution.

meet the same problem on some macOs, and don’t know why

this problem caused by BufferAttribute array length; one of Attributes length not right in my case

1 Like