I create my VBO like this:
glGenBuffersARB(1,&polyvbo);
glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * tempvct.size(),&tempvct[0],GL_DYNAMIC_COPY);
Then to update it I just do the same thing:
glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * tempvct.size(),&tempvct[0],GL_DYNAMIC_COPY);
(needless to say, the data in tempvct changes)
I'm just wondering if the above produces a memory leak. do I need to delete the vbo and recreate it, or will it automatically delete the old and update?
Thanks