I create my VBO as follows:
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:
glBindBufferARB(GL_ARRAY_BUFFER_ARB,polyvbo);
glBufferDataARB(GL_ARRAY_BUFFER_ARB,sizeof(GLfloat) * tempvct.size(),&tempvct[0],GL_DYNAMIC_COPY);
(of course, the data in tempvct changes)
I'm just wondering if the aforementioned memory leak problem could be. Do I need to remove vbo and recreate it, or will it automatically delete the old one and update it?
thank
source
share