
Originally Posted by
mbentrup
If the data in the buffer is still required for some OpenGL commands waiting in the pipeline, glBufferData will keep an (orphaned) copy of the old data and allocate new storage for the buffer opject to upload the data to.
glBufferSubData may need to wait until the GL commands have finished before it can modify the buffer, though some drivers avoid this by creating a temporary buffer for the subdata and inserting the equivalent of a glCopyBufferSubData into the pipeline.
There is no guarantee that one way or the other is better on all drivers / OSes / GPUs, but I'd take glBufferData when I have to replace the whole buffer.