Skip to content

Commit

Permalink
Merge pull request #14456 from carolhmj/fixClonedInstancedBuffers
Browse files Browse the repository at this point in the history
Fix instanced buffers of cloned meshes
  • Loading branch information
sebavan committed Oct 25, 2023
2 parents c2ed5bc + 37c77e9 commit 353fffd
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/dev/core/src/Meshes/instancedMesh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -661,16 +661,16 @@ Mesh.prototype.registerInstancedBuffer = function (kind: string, stride: number)
for (const instance of this.instances) {
instance.instancedBuffers = {};
}
}

if (!this._userInstancedBuffersStorage) {
this._userInstancedBuffersStorage = {
data: {},
vertexBuffers: {},
strides: {},
sizes: {},
vertexArrayObjects: this.getEngine().getCaps().vertexArrayObject ? {} : undefined,
};
}
if (!this._userInstancedBuffersStorage) {
this._userInstancedBuffersStorage = {
data: {},
vertexBuffers: {},
strides: {},
sizes: {},
vertexArrayObjects: this.getEngine().getCaps().vertexArrayObject ? {} : undefined,
};
}

// Creates an empty property for this kind
Expand Down

0 comments on commit 353fffd

Please sign in to comment.