I’m beginning to delve into performance optimizations and stumbled upon batchedMesh.
In my app I’ve got a lot of changing 2D-Shapes (approximately 50-100) that must be drawn. Each has the same color, but different shape, so I thought to use BatchedMeshes. Every geometry is essentially unique and I don’t know the layout up front. The shape is calculated dynamically. At the moment I add a geometry per shape and then I add an instance with the geometryId. Every geometry is just used once for one shape. The shapes are changing from time to time and then I remove the instance and geometry of the BatchedMesh and add a new geometry and shape for the change.
Can I dispose the geometry after adding the instance, without removing the instance? I’ve tested it and it looks like all is working correclty, but I’m not sure if there are any effects of deleting the geometry while the BatchedMesh is still using it.