I'm making some tests with rendering stuff and I'm wondering how to design my Geometry class. For the moment, here is how I do:
- Init: Stock array with positions, array with colors, array with normals, … has attributsattributes.
- Just before rendering, if my geometry have changed, I update his vertex buffer and index buffer. To do that, I compute interleaved array here and send it to my vertex buffer.
I've made some tests with particles (10000 on ipadiPad), the heaviest function is "Geometry::computeInterleavedArray.
So, I would like to know, How can I avoid this part? Is it better to stock geometry's data inside a single array with all data already interleaved?
Thanks you.