Skip to content

Commit

Permalink
use buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
LeXXik committed Oct 16, 2024
1 parent 4061758 commit 6e64372
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/framework/parsers/glb-parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ const createMesh = (device, gltfMesh, accessors, bufferViews, vertexBufferDict,
indices = new Uint16Array(indices);
}

const indexBuffer = new IndexBuffer(device, indexFormat, indices.length, BUFFER_STATIC, indices);
const indexBuffer = new IndexBuffer(device, indexFormat, indices.length, BUFFER_STATIC, indices.buffer);
mesh.indexBuffer[0] = indexBuffer;
mesh.primitive[0].count = indices.length;
} else {
Expand Down

0 comments on commit 6e64372

Please sign in to comment.