Reputation: 3573
I am dealing with a non-indexed BufferedGeometry. I want to re-use the same BufferedGeometry to once per frame:
I tried to use .addDrawCall(start, count)
, for which I got the following error:
THREE.BufferGeometry: .addDrawCall() is now .addGroup().
Seeing as .addGroup(start, count)
uses a similar signature, I changed to it, but to no effect.
Edit: I just noticed this paragraph regarding .drawcalls
array, which means this functionality is not available for me:
For geometries that use indexed triangles, this Array can be used to split the object into multiple WebGL draw calls.
Any way to achieve my goal using BufferedGeometry?
three.js r76
Upvotes: 0
Views: 261
Reputation: 104783
To render a subset of the vertices of non-indexed BufferGeometry
use this pattern:
geometry.setDrawRange( startVertex, numVerticesToDraw );
See this answer for related information and a live demo:
three.js r.76
Upvotes: 1