Reputation: 765
After migrating from three.js r68 to 69 to get a couple of these errors repeated:
WebGL: INVALID_OPERATION: vertexAttribPointer: no bound ARRAY_BUFFER
[.WebGLRenderingContext]GL ERROR :GL_INVALID_OPERATION : glDrawArrays: attempt to access out of range vertices in attribute 0
It appears in the WebGLRenderer in setupVertexAttributes() at this particular line:
_gl.vertexAttribPointer( programAttribute, size, _gl.FLOAT, false, 0, startIndex * size * 4 ); // 4 bytes per Float32
I use BufferGeometry, but don't know whats wrong. I checked the release notes, but couldn't get a glue. Help appreciated!
Upvotes: 4
Views: 1641
Reputation: 765
I found the problem in my code. I had to adapt my code to reflect the move of the fromGeometry() function from the BufferGeometryUtils class to the BufferGeometry class. So that fixed my issue:
var geo = new THREE.BufferGeometry();
geo.fromGeometry(otherGeo);
Anyway thanks for all the answers.
Upvotes: 2
Reputation: 801
This is fixed in the dev version.
https://github.com/mrdoob/three.js/issues/5293
Upvotes: 0
Reputation: 1597
I was getting the same warnings.
This occurs when you have objects with shadows in your scene that are drawn outside of the camera view. You can test this by;
I haven't been able to think of a clean fix, but option 2 worked for me. I haven't tried out the first option, later enabling the shadows.
Upvotes: 1