Geometry instancing in OpenGL ES 2.0

Posted by seahorse on Game Development See other posts from Game Development or by seahorse
Published on 2012-07-02T17:27:18Z Indexed on 2012/07/02 21:24 UTC
Read the original article Hit count: 500

Filed under:
|
|

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?

© Game Development or respective owner

Related posts about opengl

Related posts about opengl-es