1) Create a one global array buffer for each type of data (position, uv, normal, etc).
2) Then create one element buffer array (index) for each material index data.
3) Create one VAO for each material index array. Every VAO is going to be bound to all the global array buffer and one respective element buffer.
4) Lastly I draw every VAO.
I tried this approach with Drovaric sponza from https://casual-effects.com/data/ and it works fine, but it does not have normal data, so I used blender to generate the normals and I get a bad result when drawing the mesh, like the the vertices are out of order.
in the case of using OBJ.initMeshBuffers, how would i go about it?
Hello
I've been trying this method:
1) Create a one global array buffer for each type of data (position, uv, normal, etc).
2) Then create one element buffer array (index) for each material index data.
3) Create one VAO for each material index array. Every VAO is going to be bound to all the global array buffer and one respective element buffer.
4) Lastly I draw every VAO.
I tried this approach with Drovaric sponza from https://casual-effects.com/data/ and it works fine, but it does not have normal data, so I used blender to generate the normals and I get a bad result when drawing the mesh, like the the vertices are out of order.
in the case of using OBJ.initMeshBuffers, how would i go about it?
Thanks.