I am planning to do geometry instancing in OpenGL ES 2.0 Basically I plan to render the same geometry(a chair) maybe 1000 times in my scene.
What is the best way to do this in OpenGL ES 2.0?
I am considering passing model view mat4 as an attribute. Since attributes are per vertex data do I need to pass this same mat4, three times for each vertex of the same triangle(since modelview remains constant across vertices of the triangle).
That would amount to a lot of extra data sent to the GPU( 2 extra vertices*16 floats*(Number of triangles) amount of extra data).
Or should I be sending the mat4 only once per triangle?But how is that possible using attributes since attributes are defined as "per vertex" data?
What is the best and efficient way to do instancing in OpenGL ES 2.0?
glVertexAttribDivisor
:( \$\endgroup\$