glMapBuffer/glUnmapBuffer question

is it possible to do the following?

glbindbuffer(…, vertex_array)
glbufferdata(…,NULL,…)
void *vamapper = glmapbuffer(…)

glbindbuffer(…, texture_array)
glbufferdata(…,NULL,…)
void *tamapper = glmapbuffer(…)

…// copying data into vbo

glunmapbuffer(…)

don’t ask, try it out!

It is possible. In fact, that’s one of the ways you’re supposed to use VBOs. You also need to glUnmapBuffer the vertex_array before you can use it for rendering. One thing that concerns me is texture_array. I hope that’s any array of texture coordinates and not texture data. VBOs don’t support texture data.