Markus Siebeneicher
Markus Siebeneicher

Reputation: 765

Three.js: vertexAttributePointer: no bound ARRAY_BUFFER (after migration to r69)

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

Answers (3)

Markus Siebeneicher
Markus Siebeneicher

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

Hobbes
Hobbes

Reputation: 801

This is fixed in the dev version.

https://github.com/mrdoob/three.js/issues/5293

Upvotes: 0

Chris Laarman
Chris Laarman

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;

  1. disabling your shadows
  2. initially positioning your camera in a position so that it shows all of the scene.

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

Related Questions