Element Buffer Object size for shared VAO

144 Views Asked by At

I want to store my indexed geometry in a shared vao.

If the current vao is full, I create another vao together with the buffers for the layouts (Pos, Normals, Uvs, etc..). I create them with a capacity for say, N vertices. (Could be thousands, I want to share the max amount of similar geometry I can)

The problem is that I don't know how much size to allocate for the Element Buffer Object that should back the indexed vao.

Is there a common practice for this?

I need a single EBO for each VAO because I want to draw the whole batch with a glMultiDrawElements call, so the batch must have the indices in the same EBO.

0

There are 0 best solutions below