GeomBatch & TriangleBatch

Does anyone have a layman's description of how GeomBatch and TriangleBatch can be used or at least what the benefits of using them are. I'm not sure I understand whether they are just an internal engine feature or if they can be used to increase rendering speed.



I wrote this a while ago:



http://www.jmonkeyengine.com/wiki/doku.php?id=geometrybatch



The point of it was to batch multiple objects into a single object to try to improve rendering speed for certain objects specific to my application. Do these new classes perform something similar or are they unrelated to GeometryBatch?



Thanks

jME's batches are more lightweight than Geometry because they share some of the properties (these are contained in their parent geometry). For example, they don't have their own rotation, translation, scale, worldbound, etc.



Your type of batch (I'd suggest giving it a new name though) is even more lightweight… but you can only use it if all the properties of the geometry you're merging are the same. With jME's batches you can still have different RenderStates… eg. a common use is that different parts of your model have a different MaterialState to react differently to lights.



So really, they are two different things… so I'd say keep the wiki page in case anyone ever wants to do something like that. Maybe one day it'd be intresting to have something like this that can merge together different batches, for example.

My GeometryBatch is really for geometry with similar properties.  Maybe I'll resurrect it and get it to compile - see how the performance is with the current version of JME.