Original Post
I've been reading discussions here about the rendering process, specifically how to transfer geometry into the vertex buffers that get rendered each frame. I really like Yann's sliding slot method, it answered my questions about vertex buffer fragmentation, but I still have one issue I'd like to get cleared up. Let's say you have your large vertex buffer (VB) which you're using as a cache, and you are adding new blocks of geometry as they become visible and removing blocks of geometry as they are no longer needed. The concept is all well and good, but what about the performance of continually writing to that VB? I'm assuming it is a static VB, in order to keep it in VRAM. We're not rewriting the entire VB every frame, so I'm assuming it isn't a dynamic VB. But if it is static, wouldn't that mean that we'd potentially be locking and writing to the VB at the same time that the GPU is reading from it? Sounds like we'd be stalling the whole render process each time we try to lock the VB to copy another block of geometry into it. Or is this lock conflict not as big as it sounds? Am I missing some intermediate step that makes this work more smoothly?