wwwtyro / candygraph

Fast by default, flexible 2D plotting library.
Other
435 stars 11 forks source link

Change all 'create*' patterns to 'new *' #42

Closed wwwtyro closed 2 years ago

wwwtyro commented 2 years ago

After the tree-shaking work from @flekschas, I think it makes more sense to remove the create* pattern entirely and just use new *. This PR makes that change.

In addition, I've removed the management of vertex buffers (positionBuffer) from the CandyGraph class and am now allowing each class instance to create and dispose of its own instance geometry. Our instance geometries are super tiny, so I think the slightly increased GPU memory overhead is worth the improved simplicity.