add Mesh:setVertices to append mesh data for batching

Issue #1357 new
Colby Klein
created an issue

spritebatches aren't useful for more complex models, but it's still really useful to be able to batch things and this would make doing so easier.

having Mesh:setVertices(source, start, count) append to the vertex list would help a lot for this use case

irc log:

<holo> slime: Mesh:setVertices(othermesh, start, count) to batch meshes together would be wonderful
<+slime> how does that work when drawing
<+slime> or do you mean copying all the vertex data of another mesh?
<holo> mesh a just gets the entire range from mesh b appended
<holo> yeah, copying
<+slime> hmm
<+slime> i kind of want to keep the mesh size immutable
<holo> you could require that the initial mesh be allocated at the maximum size and that's fine for me
<+slime> make a bitbucket issue so i don't forget about it :P
<+slime> is it also fine that the vertex formats of both meshes would have to match?
<holo> hmmmm, my loaded models aren't always the same vertex format (some don't have UVs, or normals or whatever), but it seems like a reasonable thing to require that the vertex data match
<holo> matching by attribute name and zero-filling if default values are needed is probably fine for any use I can think of
<+slime> yeah

Comments (0)

  1. Log in to comment