Best practice with a big number of meshes

I am trying to understand if there is an easy way to render a big number of meshes that are all equal (let’s say a cube), but in different positions.

I am using jME3, and at the moment, I generate a single mesh that is shared by all the geometries. Each geometry has its own local translation.



I was wondering if there is a “best practice” for this kind of rendering. Sharing a single mesh is enough to trigger display lists or VOB in LWJGL_OPENGL2? Is there any trick that I can use to make my app to render at top speed?

Combine the meshes in one Geometry if possible. Theres no helper class for that atm.

Thanks for replying to my post!



How can I do this in jME3? :slight_smile:

You have to generate one custom combined mesh from your single meshes, as said theres no helper class for it, so you have to get dirty with single vertexes:

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:custom_meshes

Great! Thanks!!