Just use the functions to make a copy, and let the driver understand how to do what you want, it is likely that as long as you copy directly to the vertex buffer, in fact, it will not make a copy, but simply make your VBO data reference.
The main thing to be careful is that some drivers may not like your use of what you said was vertex data with an operation for pixel data ...
Edit: maybe something like the following may or may not work ... (IIRC spec says it should)
int vbo; glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, vbo); // use appropriate pixel formats and size glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, 0); glBindBufferARB(GL_PIXEL_PACK_BUFFER_ARB, 0); glEnableClientState(GL_VERTEX_ARRAY); glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo); // draw stuff
Edited to correct buffer bindings thanks to Phineas
Spudd86
source share