如果我将顶点添加到数组缓冲区,如下所示,我将如何删除最后添加的顶点?
// Append vertex to array buffer
static inline void addVertex(NSUInteger *length, NISignaturePoint v) {
if ((*length) >= maxLength) {
return;
}
GLvoid *data = glMapBufferOES(GL_ARRAY_BUFFER, GL_WRITE_ONLY_OES);
memcpy(data + sizeof(NISignaturePoint) * (*length), &v, sizeof(NISignaturePoint));
glUnmapBufferOES(GL_ARRAY_BUFFER);
(*length)++;
}