I'm trying to understand batching and I'm not sure to understand how to do that, can I have more informations please? Here is what I found for the moment:
Batching informations
There is many types of batching:
- Sprite batching
- Geometry batching
- ???
Sprite batching
This method is useful to draw all sprites with only one draw call. To do that, a SpriteBatcher class need to get all the mesh with the same Material and the same Geometry (sprite = square geometry).
- Get Sprites with same Material
- Send all Sprite's matrix to a Sprite shader (http://antonholmquist.com/blog/sprite-batching-opengl-es-2-0/)
Geometry batching (With static geometry)
Merge meshes's geometry, so you we can draw all meshes in one draw call.
- Get all static meshes
- Merge meshes's geometry and calculate their position with there matrix (Compute a single VBO and IBO)
- Hide original mesh to avoid twice draw.
Am I right with that? Thanks!