Is there a way to be notified that a buffer transfer is complete with OpenGL?
As part of a simple test that I am doing this weekend, I have the following code:
for (int n=0; n < 50; n++)
glDrawElements(lots_of_stuff), this draw call is accessing buffer "B[n]"
I am updating the buffer after (eg. not before) glDrawElements, so that the glDrawElements call, above, which is dependent on the buffer, doesn't stall the GPU. It seems to be OK but somehow I wonder if sometimes the transfer doesn't take so freaking long that glDrawElements has to wait for the buffer contents to be there.
So I could play with two buffers and switch over when the buffer contents have been uploaded to GPU memory. But I need to be notified of this. Is this possible?