Original Post
I have an option in my low level rendering layer to specify that a buffer may be discarded on lock. This is pretty straightforward in D3D, but I'm unsure if manually invoking BufferData with a NULL pointer is beneficial. The D3D docs mention that doing so may help prevent a DMA stall. Is the same true for OGL? I'm not noticing any performance difference, but then again, I'm not dynamically locking buffers at the moment, either. The buffer is already sized once at load by a BufferData call. I don't want the new BufferData call to force the driver to allocate new memory, I just want to indicate that new memory may be used, if desired.
Quote:This seems kind of vague to me.
GL_ARB_vertex_buffer_object specs Should there be a PRESERVE/DISCARD option on BufferSubDataARB? On MapBufferARB? RESOLVED: NO, NO. ATI_vertex_array_object had this option for UpdateObjectBufferATI, which is the equivalent of BufferSubDataARB, but it's unclear whether this has any utility. There might be some utility for MapBufferARB, but forcing the user to call BufferDataARB again with a NULL data pointer has some advantages of its own, such as forcing the user to respecify the size.