Another big advantage of indexed meshes is the fact that they are easier to read and manually modify, allowing procedural mesh generation.
So today I refactored everything mesh-related, starting from the loading of the mesh, which now produces a vertex array and an index array.
Then I modified all the batches, both 2D and 3D to use the new indexed mesh. Now everything is working and maybe I gained a little fps in all of this, but the real win is the possibility to easily access the mesh data.
Tomorrow I'll try to write a mesh_builder class to procedurally generate meshes.
Nessun commento:
Posta un commento