So I have a problem, In my eyes, doing this:
someBatch.begin();
someBatch.add(10, 10, 10, myMesh);
someBatch.end();
Is super super bad… I’d prefer if it was
someBatch.begin();
someBatch.add(myMesh);
someBatch.end();
And used a matrix inside the mesh to change it’s positions/texcoords like so:
public class MeshBatch ...
public void add(Mesh mesh){
for(Vertex v : mesh.getVertices){
v.position = v.position.mul(mesh.vertTransform);
v.texUV = v.texCoord.mul(mesh.texTransform);
}
//... Add values to buffer
}
...
Would doing the above operation be bad on the CPU? Is there another possible way (if so, please explain)?
Thanks in advance!