PDA

View Full Version : glMapBuffer/glUnmapBuffer question



grunt123
12-09-2003, 06:33 PM
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(...)

AdrianD
12-10-2003, 06:25 AM
don't ask, try it out!

idr
12-11-2003, 10:02 PM
It is possible. In fact, that's one of the ways you're supposed to use VBOs. http://www.opengl.org/discussion_boards/ubb/smile.gif 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.