Search code examples
opengl-esvbovertex-shader

opengl-es draw lots of transformed objects efficiently


I am writing an opengl es program to construct a large scene contains a lot of objects transformed from several based objects. For example, the object A has about 700 vertices and 600 faces, and the geometry of objects a1, a2, a3, ..., a100 are transformed from object A with individual matrix(4*4).

So, I'd like to know if there is an efficiently way to draw these objects with optimal draw calls and bandwidth. For example, is there a way to pass the transform matrixes into shader and generate the points for all those objects?


Solution

  • For Opengles3.0, I find drawXXXInstanced can handle it perfectly.