I am initializing a object with following code.
std::vector<float> topRightBevelData = draw_circular_bevel(rightWidth, rightHeight, rightTopBevel, 1, 1, iSegmentsRightTop);
glGenVertexArrays(1, &m_VAOTopRightCircle);
glGenBuffers(1, &m_VBOTopRightCircle);
glBindVertexArray(m_VAOTopRightCircle);
glBindBuffer(GL_ARRAY_BUFFER, m_VBOTopRightCircle);
glBufferData(GL_ARRAY_BUFFER, topRightBevelData.size() * sizeof(float), &topRightBevelData[0], GL_DYNAMIC_DRAW);
Than i would keep updating the VBO.
std::vector<float> topRightBevelData = draw_circular_bevel(xWidth / 2.0, 0.0, 0.0, rightWidth, rightHeight, rightTopBevel, 1, 1, iSegmentsRightTop);
glBindBuffer(GL_ARRAY_BUFFER, m_VBOTopRightCircle);
glBufferSubData(GL_ARRAY_BUFFER, 0 ,topRightBevelData.size() * sizeof(float), &topRightBevelData[0]);
Sometimes the data updating the vbo would be larger than the size of VBO , in that case can i increase the size of VBO ?