Dynamic Vertex Problem #3683
-
Hi Filament community, I'm trying to change my vertices data like add/remove,but the vbo is STATIC. if my vertices size more than the vertex size, how should i do. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can't change the VBO size, but you can change the active range of indices in the index buffer by calling Alternatively you can simply create a brand new VertexBuffer when your required size changes beyond the initial capacity. For an example of this, check out |
Beta Was this translation helpful? Give feedback.
You can't change the VBO size, but you can change the active range of indices in the index buffer by calling
setGeometryAt
. This is useful if you know the maximum size ahead of time.Alternatively you can simply create a brand new VertexBuffer when your required size changes beyond the initial capacity. For an example of this, check out
ImGuiHelper.cpp
. It grows the buffer by 2x each time by recreating the VertexBuffer.