I have two PBOs, which I create with wglCreatePbufferARB and the other appropriate methods.
When rendering my data each cycle, I draw inside the first PBO, after that I want to copy the entire data of the first PBO to the second PBO.
After copying the data to the second PBO, I bind a texture to it and then I draw a textured rectangle with that data.
glBindTexture( GL_TEXTURE_2D, g_dynamicTextureID);
My problem is that I do not know how to copy from one PBO to another. I saw the ARB_copy_buffer extension and I am willing to use OpenGL 3.1 but I do not know how to use it in my example.
Can somebody please help me with some code?